emediastudios Posted November 12, 2007 Share Posted November 12, 2007 I have a contact form in php and want the first text field to be auto selected, my field is called 'First' id= First. is this php or java script? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 12, 2007 Share Posted November 12, 2007 most likely javascript is what your looking for - something like this: <script language="javascript"> function readyform() { document.formNameHere.formFieldNameHere.focus(); } window.onload=function() { readyform(); } </script> </head><body> <form name="formNameHere"> <input type="text" name="formFieldNameHere"> </form> Quote Link to comment Share on other sites More sharing options...
emediastudios Posted November 12, 2007 Author Share Posted November 12, 2007 most likely javascript is what your looking for - something like this: <script language="javascript"> function readyform() { document.formNameHere.formFieldNameHere.focus(); } window.onload=function() { readyform(); } </script> </head><body> <form name="formNameHere"> <input type="text" name="formFieldNameHere"> </form> Your the man!! Thanks heaps 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.