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

sending form input to a pop-up?

Status
Not open for further replies.

ilmaggy

Programmer
Jan 4, 2005
11
NL
Hi,

I have a form and with a button I open a pop-up. I want to show the values of the form in this pop-up. I think this is possible in Javascript.
My code:
<input type="button" name="preview" value="Preview" onclick="MM_openBrWindow('popup.php' ,'trailerpopup','scrollbars=no,width=310,height=250'); return false">
What is the Javascript in the pop up to show the values of the form?
Could anyone help me?
Thanking you in advance,
ruben.
 
As the Window has name you can reference it from the calling page using something like :

document.trailerpopup.myForm.firstField.value=document.myOriginalForm.firstOriginalField.value

This sets the value of a field called firstField on a form called myForm in the popup to the value of the field fistOriginalField in a form called myOriginalForm in the parent document.

You can also use the OPENER pointer from the popup to refer to the document that 'opened' the popup.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top