How to give the Target of pop-up window form as a frame in the main window

Ram Thirumangalam

Greenhorn

Posts: 20

posted 12 years ago

Hi I wish to know how to specify the TARGET of a form in a pop-up window as a particular frame in the main window that opened this pop-up. From what I could see from the posts is to specify a name for the main window and then having the target of the form in the pop-up as the name of the main window. My issue is a little complicated: Here we go! The functionality of my application allows the user to have many windows open by having a unique name for each (each of them pertaining to a particular invoice and containg details of it) and then the user can activate the pop-up (which is actually a form for entering search criteria) from any of the window. So I need the unique name of the main window that opened the pop-up to be passed to the pop-up as a variable and can I specify that 'variable' as the target? Would it be possible to specify the target as a particular frame in the concerend main window? Any help / suggestions would be greatly appreciated!! Would using a submit button and function for onclick of that button with code in the function specifying the new url(servlet) for that frame in the main window with parameters (built form the forms content) passed to that servlet be a workaround?

Main Window code; ============== <SCRIPT LANGUAGE="JavaScript"> window.name = "main"; </SCRIPT> Then from my pop-up window, to post the data back to 'main' the FORM element looks like this: <FORM action="main.php" METHOD="POST" target="main"> Since I can have multiple main window open, can I pass the name of the main window as a variable to the pop-up and then give that variable in the TARGET field of the form in the pop-up?

Once again, I would really appreciate any possible suggestions for this. Thanks

Eric Pascarello

author
Rancher

Posts: 15385

6

posted 12 years ago

Okay I am just lost on what you are trying to do here. Lets say you have 1 main window. That window opens up a pop-up window and you want to submit back to it?? Is that what you are saying? Eric