| Kindler Chase 2004-03-12, 3:28 am |
| I need to encode the backslash in a JavaScript generated URL and have found
that the JavaScript function 'escape' will not encode these characters:
* @ - _ + . /
I need to encode the backslash, i.e., %2F - and this is what I've come up
with:
function n3_backSlash(url){
url = url.replace(/[/]/g,'%2F') // Everything in sq. bracket will be
replaced with a %2F
return url;
}
Though this appears to work fine, I'm not sure if I've set up the RegEx
properly. Is this correct? or is there another way to encode the backslash?
--
kindler chase
http://www.ncubed.com
Home of SuperInvoice: The Online Invoicing Application.
Organize your billing process and impress your clients.
news://news.ncubed.com/support
n3 Support Group
|