unitechpetro Posted June 1, 2006 Share Posted June 1, 2006 Can somebody please tell me if HTML code exists that can cause the cursor to end up in a specific text field box on my website? http://keyelementsresale.com/page5.html I am trying to auto-fill my website address in the email field that requires same so that my users only have to enter their username and password. Right now, they have to enter the website address, too! This annoys them and me. The web-mail system is proprietary to my webhost. Therefore, I have no way to program the html code within same. However, using iframes, I did manage to embed web-mail into my website. And, manually pushing the [tab] key several times does cause the cursor to end up in the desired text field entry box. My hope is to find HTML code that will replicate/simulate the [tab] key on my visitors' computer when they visit said web-mail page at my website so that the cursor ends up in the field after the blue @ symbol. Then, additional html code to enter my website address, automatically. Then, more html code to put the flashing cursor in the username text field box immediately preceeding the blue @ symbol. Any ideas or suggestions on how to do this, what keywords to search with, or where to look, please? Any help would be very welcome. Thanks! Link to comment Share on other sites More sharing options...
scott100 Posted June 1, 2006 Share Posted June 1, 2006 Can somebody please tell me if HTML code exists that can cause the cursor to end up in a specific text field box on my website?Not HTML but Javascript, use focus()http://www.w3schools.com/js/tryit.asp?filename=tryjs_focus Link to comment Share on other sites More sharing options...
unitechpetro Posted June 2, 2006 Author Share Posted June 2, 2006 Thankyou for your suggestion, scott100. Unfortunately, I'm not able to use the javascript focus, because the code requires that I have access to the underlying elements within Web-mail, which I don't (as I explained in my original post, above). But, thanks anyway. I appreciate the tip. Again, what I need is code that will simulate/replicate the [tab] key, so that the cursor ends up in the second box on my webmail form long enough to autofill same with pre-specified data, then to reposition cursor to the box immediately preceeding the @ symbol. Thanks, again! I am looking forward to any reply. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 4, 2006 Share Posted June 4, 2006 Javascript is really the only way that you can do dynamic things like that on the client side. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now