Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Checking which button has been selected on a form, and disabling multiple buttons.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,28679
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checking which button has been selected on a form, and disabling multiple buttons.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Checking which button has been selected on a form, and ... - 12/5/2005 7:51:00 PM   
  KeithHinde

 

Posts: 1
Score: 0
Joined: 12/5/2005
Status: offline
Hi.

On quite a few of the pages on our intranet, we have 2 buttons.  One submits the page after user input and returns the data from our database, the other redirects to a new page which sends the data to an excel spreadsheet.

The buttons that we have created are called the same name (see below), and we detect whcih button has been selected on the form by checking the value of the object in server-side scripting, e.g. if request("submit1")= "To Excel" then ....

< input type="submit" value="Get Results" id=submit1 name=submit1>
< input type="submit" value="To Excel" id=submit1 name=submit1>

What I need to do is to disable the buttons once either button has been selected and the form has been successfully validated.  I can do this for a single button on a page by   window.form1.submit1.disabled = true, but I can't make it work for both buttons.

Please can someone advise how I do this, or have we caused ourselves problems by having the buttons called the same name.  If so and we need to have different button names, how would I then detect which button hand been clicked?

Thanks in advance.
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checking which button has been selected on a form, and disabling multiple buttons. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts