[thelist] 2 events one onClick?

Richard Bennett mail at richardinfo.com
Thu Jun 28 05:40:48 CDT 2001


Hi,
You can have more than one events on one click, there are several ways, one
would be to add the second event into your validation script, like this:

function validate(){
    if(cond1)blah
    else if(cond2)blah
    else if(cond3)blah
    else{
        alert('thank you')
        return true
    }
}

although I don't think you'd want to redirect to a thank-you page by
JavaScript, as submitting the form will take you to the page your CGI script
returns to you, be it an error, or a thank-you page anyway.

Cheers,
Richard Bennett

mail at richardinfo.com
www.richardinfo.com

Richard Bennett
Independent Software Consultant
Leemputstraat 41
2600 Berchem, Belgium
Phone: + 32(0)475 71 91 84



----- Original Message -----
From: "Adrian Fischer" <adrian at logo-logic.com>
To: "The List " <thelist at lists.evolt.org>
Sent: 28 June, 2001 12:26
Subject: [thelist] 2 events one onClick?


> Hi Gang,
>
> 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 (?).
>
> Can I do what I want?
>
> Adrian Fischer
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list