| |
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.
|
|