Popup Windows: From a Form
For our next variation on the popup theme we're going to open the popup from a form. In this example we're going to change the script around. The following script is custom designed for opening a popup from a form. (We'll gloss over the details of how the script works for now. For the gory details on this script see Under the Hood: The Popup From a Form Script.) It works with forms that use both
GET. Copy the following script exactly as-is into the
<FORM METHOD=POST ACTION="../cgi-bin/mypopupcgi.pl" onSubmit="popupform(this, 'join')">
The first argument for
popupform() is always
this, meaning the form itself. The second argument,
'join' in this case, is a unique name for the popup.