Passing & (ampersand) to a new window

J

jodleren

Hi

Pretty simple, I am sure. I have a small JS script, which is

function OpenSomething(input)
{
win3=window.open("some_file.php?info=" +
input,"mywin","width=500,height=600,scrollbars=yes,resizable=yes");
return false;
}

The problem is that "input" comes from a text box, and can contain
ampersand.
All I need is to replace ampersand with %26, and do the same in PHP
(which I know how to do).
But how do I do that in JS?

WBR
Sonnich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top