473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Disable submit button after click but fire validators?

I have an ImageButton which I would like to have the following
behaviour:

(1) User clicks button, button is disabled.

(2) Page validators fire

(3) If page fails client side validation, reenable button. Otherwise
submit.

I have tried the following code but it is not working:

JS:

function btnSave() {
document.all["next"].Disabled = true;
Page_ClientValidate();
document.all["next"].Disabled = !Page_BlockSubmit;
}

..NET:

next.Attributes.Add("onclick","btnSave()");

Anybody have any ideas?

Dec 16 '05 #1
1 4304
change Disabled to disabled (lower case);

"Chris Ashley" wrote:
I have an ImageButton which I would like to have the following
behaviour:

(1) User clicks button, button is disabled.

(2) Page validators fire

(3) If page fails client side validation, reenable button. Otherwise
submit.

I have tried the following code but it is not working:

JS:

function btnSave() {
document.all["next"].Disabled = true;
Page_ClientValidate();
document.all["next"].Disabled = !Page_BlockSubmit;
}

..NET:

next.Attributes.Add("onclick","btnSave()");

Anybody have any ideas?

Dec 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
4
by: James Brett | last post by:
I have one form on the page but have multiple submit buttons for different elements. When clicking on a button not associated with the required elements the validator popup still comes up. How...
4
by: owingruters | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on....
2
by: Sam Miller | last post by:
Hi, I have a button event that won't fire. I left it on Friday and it worked fine. I came back in on Monday and it won't fire. I tried putting another button and just putting a...
2
by: Martin Knott | last post by:
Hopefully an easy answer. I've got a form with 1 input field, and a submit button. I register an event for the button, run in debug mode, push the button and sure enough I'm in the event...
1
by: Shaker | last post by:
For simplicity, I have on one form: -textbox1/Requiere For validation1 / submitbuttun1, -textbox2/Requiere For validation2 / submitbuttun2, I have two submit buttons on an ASP.Net page with...
3
by: aljodo | last post by:
ASP.Net v1.1 & vb.net Hi all, I have a simple survey form with first name/last name text boxes at the top. I have validators on these text boxes to ensure that something is entered in them. ...
16
by: Barry Gilmore | last post by:
Is there a way to disable a button after it is clicked? I am trying to avoid having someone click on it twice while they wait for it to process. Thank you!
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.