[thelist] netscape problem submitting php form from popup

Michael Mell mike at nthwave.net
Mon Jun 17 15:24:01 CDT 2002


I've seen this before. It seems like netscape closes the window before
submitting the form, and closing the window kills all processes originating
from the window, so the form dies unsent.

You'll need to submit the form, then close the window.
Here are two work arounds to try:
1) submit the form to a javascript on the pop up. The javascript then submits
the form to the parent page, and only then calls self.close()

2) submit the form directly to the parent page. When a submission is received
on the parent page, use javascript document.write('childWindow.close();')

Hope that helps,
m


Keith Shaffer wrote:

> Hello all,
>
> I am having a problem when a user submits a form via php using a javascript
> popup window.  It works fine in IE, but in netscape it just closes the
> window and does not submit the values.  If anyone notices anything weird I
> would appreciate it.  Here is what I am doing:
>
> <!-- launch the popup window on body load -->
> open ('/smallbusiness/popup.php', 'popup',
> 'toolbar=1,location=0,directories=1,status=1,menubar=1,scrollbars=1,resizabl
> e=0,width=400,height=360');
>
> <!-- contents of popup window -->
> <body onload="window.opener.name='mainwindow';">
>
> <form action="zipcode.php" method="post" target="mainwindow"
> onsubmit="window.close();">
> <table height="328" width="350" cellspacing="0" cellpadding="0" border="0">
> <input type="text" name="zipCode" id="zip" size="10" maxlength="10">
> <input type="submit" name="submit" id="submit" value="go">
> </form>
>
> Then on my catch page I am basically doing:
> if ($HTTP_COOKIE_VARS["zipCode"]!=""){
>
> perform the rest
>
> Ideas on how to make this work in netscape?  Much appreciation!
>
> Thanks,
>
> Keith
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !

--
mike[at]nthwave.net
llemekim         YahooIM
415.455.8812     voice
419.735.1167     fax





More information about the thelist mailing list