Jump to content

Send form variable to a next page


houssam_ballout

Recommended Posts

If one page opens a new window, that new window has a reference of the original window stored in the DOM. You can use this reference to get at the values that are stored in the form:Original Window:

<form><input type="text" id="myTextBox" value="SomeValue" /></form>

Child Window:

<script type="text/javascript">var wnd = window.opener;if(wnd){	var input = wnd.document.getElementById("myTextBox");	if(input)	{		alert(input.value);	}}</script>

Check out the section of the HTML DOM tutorial that deals with the window object:http://www.w3schools.com/htmldom/dom_obj_window.asp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...