1.how to set focus on a particular field when that field is not filled by a user ?
- how to use tab key for navigating to different fields ?
1.how to set focus on a particular field when that field is not filled by a user ?
[php]
<?php if(isset($_GET['usernamefielderror'])){ //Variable passed back from form processing function through URL echo('');//text field with focus if set }else{ echo('');//text field without focus because its not set } ?> [/php]You may want to identify it with ID instead of NAME.
tabindex=1
function checkForm(){
var x=document.forms[“myForm”][“myField”].value
if (x==null || x==""){
alert(“Name is required”);
document.getElementById(‘fieldID’).focus();
return false;
}
}
@thanxx codeguru …i found it very helpful .well explained 