Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SetFocus on first field

Guest
Mar 01, 2009 Mar 01, 2009
Hi

I have a cfform as follows:

<cfform action="" method="post" name="contactfrm" preloader="yes" format="flash"
height="300" width="500" skin="haloblue" timeout="30" onload="FName.setFocus()">

When the onload event runs the first input field has a blue glow around the edge of the box, but I can't find a way of making the cursor active in the field so that the user can start typing without having to click the mouse in the field first.

Can anybody help please.

Thanks.
Diane
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 28, 2009 Jun 28, 2009
LATEST

Hi,

Please add this code at the bottom of your page
<script type="text/javascript">   
      document.getElementById("FName").focus();    
  </script>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources