Re: PHP script and new window.
| From: | Nikhil Goyal | Date: | Tue, 24 Apr 2001 14:15:12 +0000 |
| Subject: | Re: PHP script and new window. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50079@lists.php.net to get a copy of this message | ||
""Plutarck"" <aemuli@spamclause-yahoo.com> wrote in message
news:9c2gdi$170$1@toye.p.sourceforge.net...
> First of all, I believe since you are using javascript on your button you
> shouldn't use type="submit". Change it to type="button", which means
> it
will
> have no effect for browsers that don't have javascript enabled when
clicked.
> That could be an error, for one. But then again, it might not.
I had a similar requirement - to run a javascript when a form is submitted.
the best way to do this was to remove the 'onClick' event from the submit
button and instead make an 'onSubmit' event on the <form>
but remember that onSubmit must return true is the form is to be submitted,
false if the form is NOT to be submitted. It must return.
> It might cause it to be submitted to one page and opened on another, which
> very well may be what you want to happen. However it might be that the
Another good way to do that is to add a <TARGET="_blank"> option to the FORM
tag. Or you can add a TARGET="windowname" option, where windowname is a
window which your onSubmit code opened. This will submit the code and
display results in a new window
N