A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
ford Darcy Jr
Joined: Jan 26, 2005
May 25, 2005 08:33:00
Here is the code:
var str1 = document.formname.filename.value
str1 = str1.replace(" ", "%20");
and this function is called on the submit button.
Can you please let me know where I am going wrong.
Joined: Nov 08, 2001
May 25, 2005 08:46:00
you want to do this:
regEx = /\s/gi; str1 = str1.replace(regEx, "%20");
but you might be better off by doing
var str1 = escape(document.formname.filename.value);
[ May 25, 2005: Message edited by: Eric Pascarello ]
Don't get me started about those stupid
subject: Replace function
RegExp Help Needed!
How to use JSTL varraible in to jsp
Problems with action
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015