Back to myContactForm.com - Easy email form creation and processing for your web site
myContactForm.com - Help Forum Forum Index myContactForm.com - Help Forum
Have a question that you need answered about myContactForm.com? Post it on this message board but first search this forum and read out FAQ to ensure it has not already been answered. This is not a board to post links to your site! SPAM will be deleted!
 
   Search MessagesSearch Messages
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Set focus to a secific text box when Page loads

 
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Form Management
View previous topic :: View next topic  
Author Message
denbo



Joined: 13 Jun 2007
Posts: 4

PostPosted: Sat Jul 28, 2007 11:55 pm    Post subject: Set focus to a secific text box when Page loads Reply with quote

I've been trying to use Javascript Focus() function to set the focus to the first textbox entry on my page when it loads (this is q[1] in my form) - something which I consider essential.

It seems the names given to MyContactForms are 'non-standard' and the function doesn't reconise the textbox.


Anyway - for anyone who wants to do the same thing the following code somrwhere between the <body> </body> does the trick, for me asnyway.

<script type="text/javascript">
document.getElementById('q[1]').focus();
</script>

If you try it and it doesn't work for you, don't ask me why. I know nothing about javascript - I'm a novice who is designing my very first website. I got this from a Google search. Shocked
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Form Management All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group