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

passing a form object to a function in a Different html page

Status
Not open for further replies.

finty

Programmer
Jun 7, 2002
10
GB
this is probably very basic but it would be helpful to know how it is done. I know how to pass a form objewct to a function on the Same page but can you send it to one on another page.

thanx in advance
 
I know how to pass things from the window.opener to the popup or from the popup to the window opener.
In this example I am not exactly passing things but retrieving items in the popup from the window.opener.

this is test.htm:
<script>
var newWin = window.open('pop.htm',null)
function startFunctionInPopup() {
newWin.otherWinFunction();
}
</script>

<input type=button id=btn name=&quot;hey this is the name of the window opener button&quot; value=&quot;click&quot; onclick=&quot;startFunctionInPopup();&quot;>

This is pop.htm:
<script>
function otherWinFunction() {
alert(window.opener.document.getElementById('btn').name)
}
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top