ASP.Net IE6 disable button
- by RemotecUk
Hi, I have the following code running as part of my OnClientclick attribute on my custom ASP.Net button....
function clickOnce(btnSubmit) {
if ( typeof( Page_ClientValidate ) == 'function' ) {
if ( ! Page_ClientValidate() ) {
return false;
}
}
btnSubmit.disabled = true;
}
There is a validator on the page.
If a given text box is empty then the validator activates no problem.
If a given text box is populated then the button disables but a post back does not occur.
The rendered markup looks like this...
<input type="submit" name="TestButton" value="Test Button" onclick="clickOnce(this);WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("TestButton", "", true, "", "", false, false))" id="TestButton" class="euva-button-decorated" />
This works nicely in Firefox but not in IE6. Its almost like after the button has been disabled it simply does not run the post back javascript.
Any ideas welcomed.
EDIT: I have tried returning true from the function as well.