• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic