I have an ASP:Button on my website:
OnClientClick="return CheckTerms();" CssClass="submit" OnClick="BtnRegister_OnClick" />
When the OnClientClick event is triggered, I run a JavaScript function to perform some checks. Depending on the result of these checks, I want to decide whether to proceed with the postback or not.
Interestingly, this setup works well on all browsers except for Internet Explorer 7, where the postback still occurs even when false is returned from OnClientClick.
Can anyone provide any suggestions or hints to help with this issue?
I appreciate any assistance you can offer. Thank you!
To clarify further, here is the code snippet that is causing trouble:
function CheckTerms() { return false; }This is how the buttons are rendered in different browsers:
Internet Explorer
Chrome:
<input type="submit" name="ctl00$plhMain$Register$btnRegister" value="??????????????????" onclick="return CheckTerms();" id="ctl00_plhMain_Register_btnRegister" class="submit">
Please note that I am using PIE.htc on my inputs, but not on the button itself.
Any ideas on what could be causing this issue? jQuery16100078065287469022415