Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > submitting a popup form back to opener

submitting a popup form back to opener
Thread Tools
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Dec 14, 2003, 12:29 PM
 
I've read alot of great articles that give info on how to do this, but I have one problem:

my popup isn't a static page. It is a product search form that goes through about 4 steps before it gets to the step that has the form to submit back to the opener. Only by this time, the opener is unset and I can't seem to get the form to post back to the opener anyway.

any ideas?
     
Registered User
Join Date: Jul 2003
Location: San Jose
Status: Offline
Reply With Quote
Dec 14, 2003, 02:31 PM
 
if i understand what you're trying to do, you can pass the variables in the url (as long as you're not passing sensitive info) and then have a script in the opener that will get the values out of the url.... or, if you're using something like php, you can set up a session which will allow you to pass variables between pages

maybe a link so we can see what you are trying to accomplish...
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Dec 14, 2003, 05:01 PM
 
Originally posted by mzllr:
if i understand what you're trying to do, you can pass the variables in the url (as long as you're not passing sensitive info) and then have a script in the opener that will get the values out of the url.... or, if you're using something like php, you can set up a session which will allow you to pass variables between pages

maybe a link so we can see what you are trying to accomplish...
I tried passing the form to the parent target. Actually I named the parent window "mainWindow" for instance. But I was unable to target it for some reason. target="mainWindow" always opened a new window. A few JS alerts to debug shows that its name was in fact "mainWindow" and the popup knew this as well, so why the link would not target it I don't know.

Here is what I am doing: I am creating a manual order entry system for out website, using PHP & mySQL. I have a link on the main order input page that opens a popup to add products to the order in a sort of virtual cart, and then once that is finalized, it can be dumped back to the main order input page.

The problem was, that I was trying to assign values to form elements that the parent form does not have. I solved it by having the popup do all the work. I moved all the php to dump the products to the order over to the popup, and made it that when they are dumped, it adds them to the order in the database and then using JS refreshes the main order input page (actually submits the main order input page's form incase anything on that form was changed while adding products to the order), so the newly dumped products show up on the main order input page.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2