mikeh623 Posted May 4, 2006 Share Posted May 4, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/ Share on other sites More sharing options...
ober Posted May 4, 2006 Share Posted May 4, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/#findComment-33335 Share on other sites More sharing options...
mikeh623 Posted May 4, 2006 Author Share Posted May 4, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/#findComment-33342 Share on other sites More sharing options...
ober Posted May 4, 2006 Share Posted May 4, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/#findComment-33344 Share on other sites More sharing options...
mikeh623 Posted May 4, 2006 Author Share Posted May 4, 2006 Thanks, I posted there. Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/#findComment-33349 Share on other sites More sharing options...
craygo Posted May 4, 2006 Share Posted May 4, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/9061-post-vars-not-getting-to-popup/#findComment-33374 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.