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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup Window needs variable from Parent Window 2

Status
Not open for further replies.

blackte

Programmer
Jul 24, 2001
80
US
I'm working on an ASP page that has several popup windows associated to it. I would like to send a variable from the parent(main) window to the popup. Can someone point me into the direction of what I would need to do from both the parent window and popup.

I'm wandering if a hidden variable would be the way or not?

Thanks in advance for the help with this.

Thanks TBlack.
 
check the javascript forum...you'll find FAQs and code there


Bastien

Cat, the other other white meat
 
The easiest way to send the variable is with a querystring.

parent.asp
Code:
<script>
function getKid(inVal){
  window.open("child.asp?theVal=" + inVal)
}
</script>
<input type=button value="click me" onClick="getKid('send val')"


child.asp
Code:
<%
  response.write "Sent message = " & request("theVal")
%>

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top