Jump to content

Passing FORM data between windows


jay.barnes

Recommended Posts

This may be a hybrid HTML/PHP/MySQL/Javascript(possibly even AJAX) question, so please forgive me if I exit the scope of this forum anywhere...

 

SCENARIO:  I have a browser window that has a dynamic table, showing the results of a MySQL query.  On this page is a link that a user can click on that will pop-up a search window with a form on it that will allow him/her to search the DB by altering the parameters of the MySQL query in the original, parent window.

 

(or at least that's what I'm hoping to make it do!  :D)

 

My question is, how can I pass the form data from the pop-up window back to the parent window, so I can pass my new search parameters on the page?

 

Additionally, after passing the form data back to the parent window, I'd have to reload the parent window, in order to apply the new search parameters, right?  How would I go about telling the parent window to reload after "submit" is clicked on the pop-up window?

 

Thanks for any suggestions you guys might be able to offer - I've just about run out of ideas!

Link to comment
Share on other sites

An additional thought while turning this over in my head -

 

I think I figured out how to pass the form variables to the parent page - set the POST variables as SESSION variables....

 

Now I just have to figure out how to send a refresh/reload command to the parent window.

Link to comment
Share on other sites

You wll need to use the target="_parent" attribute in your form tag. That way when you submit the form it sends the request to the parent window.

 

You know?  I knew about the "_parent" name, but I wasn't sure if, when you loaded a pop-up window, whether it would create a static, solid parent-child link between the two windows, or if it might lose the relation, and simply spawn a new window.  :facepalm:

 

Thanks for the suggestions!  The experiments continue.....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.