Click to See Complete Forum and Search --> : Change part of URL in href to equal a form value


llamatron
09-04-2003, 10:50 AM
Say i have this line of Javascript code :

newWindow.location.href="http://www.myurl.asp?pic1&pic2&pic3"

How do i change the pic2 value to equal a value a user has entered into a textbox on a form?
Say the value entered was pic55 in a textbox called textfield.
Thanks again.

AdamBrill
09-04-2003, 11:09 AM
Try this:

newWindow.location.href="http://www.myurl.asp?pic1&"+document.formname.textfield.value+"&pic3"