Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   focus(); (http://www.programmingforums.org/showthread.php?t=11971)

paulchwd Nov 22nd, 2006 3:16 PM

focus();
 
Hi All...

I have a text filed with preloaded text in it. I have the reset button set to foucus on that field when pushed...how can i get it to focus at the beginig of the preloaded text as opposed to after it.

ie:

TT <-it curently focuses here

-->i want it to focus here TT


code:

:

<html>

<body>
<form name="f1"  method="post" onReset="document.f1.text1.focus();">
<input type="text" name="text1"  maxlength="8" value="TT">  <input type="reset" value="clear" >
</form>
</body>
</html>



All times are GMT -5. The time now is 11:29 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC