I've got code:
function check($ile,$co,$gdzie)
{
if (document.forms.form.$co.value.length >= $ile){
document.forms.form.$gdzie.focus();
}
}
And it isn't working. Error (in Google Chrome checked):
Uncaught TypeError: Cannot read property 'value' of undefined script.js:39
check script.js:39
onkeyup
And it's my html code:
<p><label><?php echo TEL; ?>: <input type='text' name='tel' size='9' maxlength='9' onkeypress="keyPressNumb(event);" onKeyUp="check(9,'tel','pesel');"></label></p>
<label><?php echo PESEL; ?>:<span class='red'>*</span> <input type='text' name='pesel' size='11' maxlength="11" onKeyUp="check11();" onkeypress="keyPressNumb(event);"></label></p>