I am not sure if you can send form values to a popup window with the "post" method. I will give an idea about that later, but first, an easier way:
I think you are getting this $Ids variable through the global variables coming from another form, or from an sql query. Anyway, it does not matter, as long as you have this $Ids ready at hand somehow, you can use it directly in your open_window function. No need for a form with a hidden textbox.
Erase the form and use only this piece of code:
<a href='#'><img src='images/titlemoreinfo.gif' border='0' Alt='Click here for more details on the $Make $Model' onClick=\"MM_openBrWindow(\"popuptemplate.php?Id=$Ids\",'template','scrollbars=yes,width=468,height=400')\"></a>
And in the popup window, get the value as $HTTP_GET_VARS["Id"]. If your register_globals is turned on, it will be available directly as $Id.
Got it?
If you insist on using the "post" method, then you should set the "target" property of the form as the name of the popup window you will open. And you should take extra care to open the popup window first and then submit the form, otherwise the form cannot find the popup and will fail.
I mean, in your form submitting Js function, you should call MM_openBrWindow function first, ideally without any document in it first, and then you should submit the form by document.forms["whatever_yours_is"].submit()
Hope I could help,
Ali Ihsan, TR
Originally posted by Anon
This form will not pass values to a popup windows and I can't figure out what is wrong. Any help? I'm sure it's something small.
Thanks,
Steve
<form action='popuptemplate.php' method='post'>
<input type=hidden name='Id' value='$Ids'>
<a href='#'><img src='images/titlemoreinfo.gif' border='0' Alt='Click here for more details on the $Make $Model' onClick=\"MM_openBrWindow('popuptemplate.php','template','scrollbars=yes,width=468,height=400')\"></a></div></form>