Posted on: 10/9/2012 12:10:17 AM | Views : 438

I have run into a problem with my custom javascript code. It disables my "Regular Expression Validator" (a Microsoft ASP.NET control) on any textbox that I add it to.
I add my javascript in PageLoad() with:
tbLimitEntryPrice1.Attributes.Add("onfocus", "IsValid(this, \"Limit Entry Price\")");
and the java script is:
<script type="text/javascript">
function IsValid(_this, Defval) {
if (_this.value == Defval) {
_this.value = "";
}
}
</script>
The script works, but the ASP.NET Regular Expression Validator on this textbox has ceased working.
Does anyone know how to make custom javascript chain to ASP.NET controls additive rather than replacing them?
Thanks!
...

Go to the complete details ...