Oh yes, surely. I'm sorry:)
I'd like to say, that I need to SET mask directly in tag. It means, I use the same javascript for different patterns, and I need somehow to tell the script, how to validate input text. Sorry, if it isn't clear enough yet
<CODE>
el.setAttribute('mask', '$$$-$$$');
</CODE>
Thanks, but I need to mask directly in tag and pass it to script, because I need 1 script to work with different masks
Hello!
Can you help me? I'm trying to add a new attribute (mask) to the input tag, but Firefox don't understand variable this.mask (while IE understanding it). As far, as I understood, this happens because "mask" - is not standard atribute of the input tag. Am I right?
And is there a way to...
2ArtWerk:
Certainly, I'm using it with length more, than 10. But when I'm just writing I want to check it, and it's more convinient to use smaller length ;) It was just an example.
2trollacious:
Yes, suely
21DMF:
thanks a lot :)
Hello everybody! I have a problem, in IE my code works properly, but Firefox writes "Error: guardMaxLength is not defined" the code is following:
checklength.js
function guardMaxLength(ta,event)
{
maxlength=parseInt(ta.maxlength,10);
if(ta.value.length>=maxlength)
{...
thanks!
function guardMaxLength(ta)
{
//check length after each time the key is pressed
maxlength=parseInt(ta.maxlength,10);
if(ta.value.length>=maxlength)
{
event.returnValue=false;
}
ta.value=value;
}
function ensureMaxLength(ta)
{
//check length before...
Hello all!
I have a problem. When I'm writing a script to validate maxlength in the textarea element, I use event.returnValue=false (or just return false).
But it works only in IE. How should I change it to work in Mozila\firefox or any other browser.
Thanks a lot!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.