Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double combo box with window.open

Status
Not open for further replies.

timjwild

Programmer
Oct 13, 2000
10
0
0
GB
Using the double combo script at
I have included a window.open command to open the target page in a new window

function go(){
URL = temp.options[temp.selectedIndex].value
window.open(URL,"newWin");
}

works perfectly. I need to know, however, if it's possible to open the window quoting a variable (the value of the selected item) Which I can use in a document.write in the new window.

Basically I want to use a template page whos content is dependant on the selection made.

I've looked through the parameters of the open method (url, name, [options]) and there doesn't seem to be room for a variable.

Any help greatly appreciated
 
you can place the variable at the end of the url, for instance:

var1 = "john"
thurl = "mypage.htm?var1="+var1

then you can access the string on the end of the url by saying: window.location.search.... that returns '?var1=john'

you can also talk to the child window by saying:
mykid=window.open("mypage.htm")
and access variables in by saying mykid.var1, or mykid.var2, etc... jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top