freelance84 Posted August 28, 2010 Share Posted August 28, 2010 Ok, just starting out into the world of js after getting a very firm grasp of php mysql and html... and i have a question: onload="document.add.forename_1.focus()" How do i put the above into an if statement, ie, if the form "add" exists on html page then focus on field "forename_1"?? Quote Link to comment Share on other sites More sharing options...
Omirion Posted August 28, 2010 Share Posted August 28, 2010 function checkForm(){ if (document.add){ document.add.forename_1.focus() } } The onload. onload="checkForm()" Quote Link to comment Share on other sites More sharing options...
freelance84 Posted August 30, 2010 Author Share Posted August 30, 2010 gracias!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.