Jump to content

Archived

This topic is now archived and is closed to further replies.

mikeh623

POST vars not getting to popup

Recommended Posts

Okay, I have a form with a dropdown and a submit button. Its action attribute calls a javascript function which opens a popup, the popup has the php script that will handle the choice made in the dropdown of the previews/parent window. The problem is, the POST vars aren't being passed to the child popup, I'm pretty sure I know why, I'm just not sure at all what to do about it, like any solutions w/o drastically changing the methodology.

Thanks for any and all help!

Share this post


Link to post
Share on other sites
You're going to have to be a little more clear on how you're passing the vars.

Does the page submit to another page that opens the pop-up, or are you opening the pop-up from the same page?

If it's the first, you have to make sure that you're filling the javascript function with the posted variables before you open the pop-up.

If it's the second, you can't use POST variables that way. You'll have to use JS to extract the data out of the form elements.

Share this post


Link to post
Share on other sites
Unfortunately, I'm using the form to open the popup. action="javascript: add_player() ;"

So, I knew why the variables weren't going. How would I use js to extract the variables and then use php to manipulate them considering server side and client side, I really don't want to involve ajax here, its just a small feature in this grand project.

Any ideas/suggestions so this doesn't become unnecessarily convoluted?

Share this post


Link to post
Share on other sites
You can easily grab the values out of the form with Javascript before opening the pop-up.

If you're unsure how, post in the Javascript board and someone should be able to help you.

Share this post


Link to post
Share on other sites
I just posted a fix in another post. look here

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=92757\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=92757[/a]

Ray

Share this post


Link to post
Share on other sites

×

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.