Jump to content

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!
Link to comment
https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/
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.
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?
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.