General discussion

Locked

JS Window.Open problems with URLEncode

By ryan_m_swank ·
I am tyring to window.open a link that has an '&' as part of the value of one of the querystring's parameters. I am changing the actual '&' to '%26amp' but window.open in IE converts it to '&'. Netscape treats it fine.
Does anyone have a workaround or know of any known bugs with this?

thanks

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

question

by shelleydoll In reply to JS Window.Open problems w ...

not sure why you're using '%26amp' when you should just use '%26', but you might want to take a look at the escape() and unescape() methods in javascript.

Collapse -

IE problem....

by ryan_m_swank In reply to question

I'm using %26 but for some reason IE is parsing it out and replacing it with & in my url string that is passed to the window.open function. escape() does nothing because the JScript isn't receiving the %26 it's receiving the converted &. Like I said if it's a regular href then the %26 works fine but sor some reason once it's placed into single quotes inside the href="JavaScript('URL STRING HERE')" then IE will convert my %26 to & on the page render PRIOR to the javascript being executed.

Collapse -

did you try

by j0s)( In reply to JS Window.Open problems w ...
Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums