One trick would be to put a hidden element in the form with an initial value
of 1. When the form is initially submited have this value changed to 2.
Have an if statement in your javascript that check the value. If the value
is 2, then short-circuit the submit and display a message.

Something like:


function changehidden()

{

 if (document.all.hidden.value == 1)// value is initially 1 to indicate form
has not been
                                    //submitted already
    {
         document.all.hidden.value = 2;
         return true;  //continue the submit process
    }
      else
    {
       window.alert("Data previous submitted; waiting results");
       return false; //stop submit process

    }

 }


HTH,

Todd
-----Original Message-----
From: Matthew Small [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 3:12 PM
To: dotnet
Subject: RE: Adding javascript onlcikc event to a button which already
has one


Hi,
        I've been trying this and variations of this with no success.
Anybody else got any ideas?

Thanks for your help

Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com


-----Original Message-----
From: Alex Dresko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 2:03 PM
To: dotnet
Subject: RE: Adding javascript onlcikc event to a button which already
has one

Try something like this in your code..

myButton.Attributes["OnClick"} += "AnotherJavascriptFunction();";

Depending on what the existing OnClick code looks like, you might have
to do this in order to add another Javascript function to the command.

myButton.Attributes["OnClick"} += ";AnotherJavascriptFunction();";

Alex Dresko
Three Point Oh!



-----Original Message-----
From: Matthew Small [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 1:16 PM
To: dotnet
Subject: Adding javascript onlcikc event to a button which already has
one


Hi -
        I'm using ASP.NET(VB) webforms.  I want to add a small
javascript line that causes my button to change its value when clicked
upon - from "Submit Purchase" to "Please Wait" so the form does not get
clicked more than once when the user is waiting for a response.
        I've tried adding an attribute to the button in question, and it
does get there.  The problem is that the button already has an onclick
event line that overrides the one that I want to use.  I've thought
about using onformsubmit, but I have the same problem there. Anybody got
any ideas?

Thanks

Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com





---
You are currently subscribed to dotnet as: [EMAIL PROTECTED] To
unsubscribe send a blank email to %%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search Subscription
Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/






---
You are currently subscribed to dotnet as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/






---
You are currently subscribed to dotnet as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/



---
You are currently subscribed to dotnet as: archive@jab.org
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to