Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 22nd, 2006, 3:16 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Exclamation 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>
paulchwd is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA WORD2k w/API? Set focus new doc after document closed cypher_soundz Visual Basic 0 Mar 21st, 2006 3:39 AM
Focus myName C# 3 Nov 17th, 2005 11:32 PM
Need Applet Focus JavaMan Java 1 Oct 29th, 2005 2:17 PM
Get Focus from a Console App? drumltd C++ 2 Aug 23rd, 2005 2:55 PM
Borland C++ Move Focus Automatik C++ 2 Jun 12th, 2005 4:18 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:52 AM.

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