SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: getting prompt at field
-
Nov 25, 2006, 12:47 #1
- Join Date
- Apr 2003
- Location
- lisboa
- Posts
- 423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
getting prompt at field
is there a way to have this field with focus (and cursor), when window opens?
TiA
-
Nov 25, 2006, 13:11 #2
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
tabindex ?
Maybe you can simply give it a tabindex of 1 ??
If that doesn't work, a javascript onload - focus should do it for js enabled users.Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Nov 25, 2006, 13:24 #3
- Join Date
- Apr 2003
- Location
- lisboa
- Posts
- 423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks for your reply
using tabs i dont know how, but i tried onLoad() but my html has no form so to speak
take a look, pls:
HTML Code:<body OnLoad="document.username.focus();"> <div align="center"><span class="data">avulsas</span></div> <div class="login"> <table width="400" border="0" cellpadding="2" cellspacing="2"> <tr> <td width="100" align="right" valign="middle"></td> <td width="146"><span id="aviso"> </span></td> </tr> <tr> <td width="100" align="right" valign="middle">Nome</td> <td width="146"><input id="username" type="text" name="username" /></td> </tr> <tr> <td width="100" align="right" valign="middle">Palavra passe</td> <td width="146"><input id="password" type="password" name="password" /></td> </tr> <tr> <td> </td> <td width="146"><input type="submit" name="submit" value="Entrar" onclick="CheckLogin()"/></td> </tr> </table>
how can i do it?
TiA
-
Nov 25, 2006, 13:29 #4
- Join Date
- Apr 2003
- Location
- lisboa
- Posts
- 423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
never mind: i added <form name="bla"> and it works
thanks a lot
Bookmarks