[thelist] 2 events one onClick?
The Optimizer
chrism at puffofsmoke.net
Thu Jun 28 06:02:08 CDT 2001
> is it possible to have to things happen on the one onCLick? I
> have one that
> checks a form for correctness. If its correct it just submits the details
> in the form and leaves them there. What I want to do is submit
> the details
> and redirect to thank you page all on the one onClick. My current JS
> function ends with a return true which I think triggers the form
> to be sent
> so I cant interfere with that or the form wont be sent (?).
Are you using POST or GET? I would be inclined to submit the information,
process it on the server and then redirect to a thank you page from the
server-side script. If the form action is the page itself, I guess you could
use POST and GET simultaneously by having:
action="thisPage.cgi?sub=yes"
and then having a javascript statement that checks the querystring
(document.location.search) and if it returns "?sub=yes" redirects
(document.location = "xxx.htm") to the thank you page. I can't really think
of any reason to do this if you have access to server side scripting, and if
not you can't process the data on the server.
Oh well, I hope my gibbering is of some help...
Regards
Chris Marsh
More information about the thelist
mailing list