XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 25th, 2004, 06:37 AM
bigdavejonnyt's Avatar
bigdavejonnyt bigdavejonnyt is offline
lord of err; master of umm
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: uk
Posts: 92 bigdavejonnyt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 47 m 40 sec
Reputation Power: 6
Send a message via ICQ to bigdavejonnyt
xhtml compliant form field focus

good day, all.

hope i'm not going to get a beasting for posting an xhtml question here - only one way to find out.

having written a beautifully xhtml compliant page - i noticed that i hadn't yet put the form field focus in to make the cursor sit in the first field to be filled in.

duly popped in
Code:
<body OnLoad="document.prodcomlobby.login.focus();">


only to discover that an OnLoad event isn't allowed in XHTML.

Anyone know how i can do this and still stay XHTML street legal ?
__________________
rgds
bdjt

Reply With Quote
  #2  
Old August 25th, 2004, 02:18 PM
Teflon's Avatar
Teflon Teflon is offline
Teflon The Black
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Woodbridge VA
Posts: 246 Teflon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 28 m 14 sec
Reputation Power: 5
Send a message via AIM to Teflon
yo check ya'self you be blingin it up proper like with ya onLoad, now you got street cred yO!
from http://www.w3.org/TR/2002/REC-xhtml...ransitional.dtd
Code:

<!--=================== Document Body ====================================-->

<!ELEMENT body %Flow;>
<!ATTLIST body
  %attrs;
  onload      %Script;       #IMPLIED
  onunload    %Script;       #IMPLIED
  background  %URI;          #IMPLIED
  bgcolor     %Color;        #IMPLIED
  text        %Color;        #IMPLIED
  link        %Color;        #IMPLIED
  vlink       %Color;        #IMPLIED
  alink       %Color;        #IMPLIED
  >

<!ELEMENT div %Flow;>  <!-- generic language/style container -->
<!ATTLIST div
  %attrs;
  %TextAlign;
  >



from http://www.w3.org/TR/2002/REC-xhtml...tml1-strict.dtd

Code:
<!--=================== Document Body ====================================-->

<!ELEMENT body %Block;>
<!ATTLIST body
  %attrs;
  onload          %Script;   #IMPLIED
  onunload        %Script;   #IMPLIED
  >

<!ELEMENT div %Flow;>  <!-- generic language/style container -->
<!ATTLIST div
  %attrs;
  >
__________________
Teflon - The Black <desc>Mark This Up</desc>

Last edited by Teflon : August 25th, 2004 at 02:21 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xhtml compliant form field focus


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT