the code is given below

<script type="text/jscript">


// Check the length of the textbox
//for new
function Length_Phone1TextField_Validator()
{
if ((aspnetForm.ctl00_ProfilePlaceHolder_txtPhone1.value.length > 2))
{
aspnetForm.ctl00_ProfilePlaceHolder_txtPhone2.focus();
return (false);
}
return (true);
}
<script>

and in cs file its code like this

this.txtPhone1.Attributes.Add("onKeyup", "return Length_Phone1TextField_Validator()");

Its not working in firefox but in IE and Safari

I guess you'll have to modify the same code so that it also works with FireFox. Things are always different when it comes to FireFox.

hi friyafingent, you should move to web development forum...guys around there...can figure out your problem clearly..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.