""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9c2gdi$170$[EMAIL PROTECTED]">news:9c2gdi$170$[EMAIL PROTECTED]...
> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to