J
Jeremy
Hi, say we have the code below on a button:
<input type="button" class="btn" value="Continue" onclick="if
(myform.p_name.value=='') alert('You must enter a name for the folder');
else { this.disabled=true; submit();}">
Not all the validation can be performed client-side so the button may be
pressed and then server validation is performed - this may result in a
request to the user to hit the back button and correct some data
entered.
Now this isn't the best UI design, I know. But nonetheless we have to
stick with this for a qhile and I have noticed a difference in the way
Fireforx and IE handles the button disbaling. On IE, when you go back to
the page, the button is enabled again whereas in Firefox it remains grey
and disabled.
Can anyone suggest a way in which we can automatically re-enable the
button when the user presses the back button? Is there some code we can
put into the onload perhaps which will go through all buttons on the
form and enable them?
Appreciate your suggestions.
<input type="button" class="btn" value="Continue" onclick="if
(myform.p_name.value=='') alert('You must enter a name for the folder');
else { this.disabled=true; submit();}">
Not all the validation can be performed client-side so the button may be
pressed and then server validation is performed - this may result in a
request to the user to hit the back button and correct some data
entered.
Now this isn't the best UI design, I know. But nonetheless we have to
stick with this for a qhile and I have noticed a difference in the way
Fireforx and IE handles the button disbaling. On IE, when you go back to
the page, the button is enabled again whereas in Firefox it remains grey
and disabled.
Can anyone suggest a way in which we can automatically re-enable the
button when the user presses the back button? Is there some code we can
put into the onload perhaps which will go through all buttons on the
form and enable them?
Appreciate your suggestions.