www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to focus on a textbox in a framed page?

  1. #1
    Join Date
    Nov 2010
    Posts
    2

    Unhappy How to focus on a textbox in a framed page?

    I'm trying to do something lik dis.
    the xhtml page from which this javascript is called is in a frame.

    Code:
    var e_id=document.getElementById("abcd");
    if(e_id.value=="")
    {
    	alert("Please enter your username/email address");		
    	e_id.focus();
    	ghi.signinform.abcd.focus();
    }
    the .focus() function doesnt seem to work.. I'm new at this.. any help is appreciated.

  2. #2
    Join Date
    Nov 2010
    Posts
    2
    Code:
    var e_id=document.getElementById("abcd");
    if(e_id.value=="")
    {
    	alert("Please enter your username/email address");		
    	e_id.focus();
    }

    SORRY! This is the actual code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles