Help please! XHTML Homework...

  • derekryans
  • Born
  • Born
  • derekryans
  • Posts: 2

Post 3+ Months Ago

Hello...I need help please. I am doing my homework for my class and for some odd reason I just don't get how to use the "tabindex". I think for the most part I am doing it right but it just won't tab to the "state" drop down box or the check box, etc. can someone please help? i am copying and pasting the HTML code from DreamWeaver. Thanks.


HTML Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www..org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Exercise3_4</title>
</head>
 
<body>
<form action="proc_form.cfm" method="post">
<div>
<fieldset>
<legend>Personal Information</legend>
<table>
      <tr>
         <td><label for="name">Name:</label></td><td><input title="Enter your name" type="text" name="name" id="name" tabindex="1" /></td></tr>
        <tr>
         <td><label for="address">Address:</label></td><td><input title="Enter your address" type="text" name="address" size="100" maxlength="100" id="address" tabindex="2" /></td></tr>  
      <tr>
         <td><label for="city">City:</label></td><td><input title="Enter the city" type="text" name="city" size="100" maxlength="100" id="city" tabindex="3" /></td></tr>
        <tr>
         <td><label for="state">State:</label></td>
            <td><select name="State" tabindex="4" id="state">
<option value="alabama">AL</option>
<option value="alaska">AK</option>
<option value="Arizona">AZ</option>
<option value="arkansas">AR</option>
<option value="california">CA</option>
<option value="colorado">CO</option>
<option value="connecticut">CT</option>
<option value="delaware">DE</option>
<option value="district of columbia">DC</option>
<option value="florida">FL</option>
<option value="georgia">GA</option>
<option value="hawaii">HI</option>
<option value="idaho">ID</option>
<option value="illinois">IL</option>
<option value="indiana">IN</option>
<option value="iowa">IA</option>
<option value="kansas">KS</option>
<option value="kentucky">KY</option>
<option value="louisiana">LA</option>
<option value="maine">ME</option>
<option value="maryland">MD</option>
<option value="massachusetts">MA</option>
<option value="michigan">MI</option>
<option value="minnesota">MN</option>
<option value="mississippi">MS</option>
<option value="missouri">MO</option>
<option value="montana">MT</option>
<option value="nebraska">NE</option>
<option value="nevada">NV</option>
<option value="new hampshire">NH</option>
<option value="new jersey">NJ</option>
<option value="new mexico">NM</option>
<option value="new york">NY</option>
<option value="north carolina">NC</option>
<option value="north dakota">ND</option>
<option value="ohio">OH</option>
<option value="oklahoma">OK</option>
<option value="oregon">OR</option>
<option value="pennsylvania">PA</option>
<option value="rhode island">RI</option>
<option value="south carolina">SC</option>
<option value="south dakota">SD</option>
<option value="tennessee">TN</option>
<option value="texas">TX</option>
<option value="utah">UT</option>
<option value="vermont">VT</option>
<option value="virginia">VA</option>
<option value="washington">WA</option>
<option value="west virginia">WV</option>
<option value="wisconsin">WI</option>
<option value="wyoming">WY</option>
</select></td></tr><br/>
   <tr>
      <td><label for="zip">Zip Code:</label></td><td><input type="text" name="zip" size="5" maxlength="5" title="Enter the five digit zip code" tabindex="5" id="zip" /></td>
   </tr>
</table>
 
Save for Future Use?<input type="checkbox" value="y" name="Save Information" title="Save your information for future use"/> <br />
Suscribe Newsletter?
Yes <input type="radio" name="newsletter" value="y" title="Check to suscribe to monthly newsletter" checked="checked" />
No<input type="radio" name="newsletter" value="n" title="Check to NOT suscribe to monthly newsletter" />
<br />
Comments:
<br />
<textarea name="comments" rows="5" cols="40"></textarea>
<br />
<input type="reset" value="Clear" />
<input type="submit" value="Submit" />
</fieldset>
 
</div>
</form>
 
</body>
</html>
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" /TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www..org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Exercise3_4</title>
  6. </head>
  7.  
  8. <body>
  9. <form action="proc_form.cfm" method="post">
  10. <div>
  11. <fieldset>
  12. <legend>Personal Information</legend>
  13. <table>
  14.       <tr>
  15.          <td><label for="name">Name:</label></td><td><input title="Enter your name" type="text" name="name" id="name" tabindex="1" /></td></tr>
  16.         <tr>
  17.          <td><label for="address">Address:</label></td><td><input title="Enter your address" type="text" name="address" size="100" maxlength="100" id="address" tabindex="2" /></td></tr>  
  18.       <tr>
  19.          <td><label for="city">City:</label></td><td><input title="Enter the city" type="text" name="city" size="100" maxlength="100" id="city" tabindex="3" /></td></tr>
  20.         <tr>
  21.          <td><label for="state">State:</label></td>
  22.             <td><select name="State" tabindex="4" id="state">
  23. <option value="alabama">AL</option>
  24. <option value="alaska">AK</option>
  25. <option value="Arizona">AZ</option>
  26. <option value="arkansas">AR</option>
  27. <option value="california">CA</option>
  28. <option value="colorado">CO</option>
  29. <option value="connecticut">CT</option>
  30. <option value="delaware">DE</option>
  31. <option value="district of columbia">DC</option>
  32. <option value="florida">FL</option>
  33. <option value="georgia">GA</option>
  34. <option value="hawaii">HI</option>
  35. <option value="idaho">ID</option>
  36. <option value="illinois">IL</option>
  37. <option value="indiana">IN</option>
  38. <option value="iowa">IA</option>
  39. <option value="kansas">KS</option>
  40. <option value="kentucky">KY</option>
  41. <option value="louisiana">LA</option>
  42. <option value="maine">ME</option>
  43. <option value="maryland">MD</option>
  44. <option value="massachusetts">MA</option>
  45. <option value="michigan">MI</option>
  46. <option value="minnesota">MN</option>
  47. <option value="mississippi">MS</option>
  48. <option value="missouri">MO</option>
  49. <option value="montana">MT</option>
  50. <option value="nebraska">NE</option>
  51. <option value="nevada">NV</option>
  52. <option value="new hampshire">NH</option>
  53. <option value="new jersey">NJ</option>
  54. <option value="new mexico">NM</option>
  55. <option value="new york">NY</option>
  56. <option value="north carolina">NC</option>
  57. <option value="north dakota">ND</option>
  58. <option value="ohio">OH</option>
  59. <option value="oklahoma">OK</option>
  60. <option value="oregon">OR</option>
  61. <option value="pennsylvania">PA</option>
  62. <option value="rhode island">RI</option>
  63. <option value="south carolina">SC</option>
  64. <option value="south dakota">SD</option>
  65. <option value="tennessee">TN</option>
  66. <option value="texas">TX</option>
  67. <option value="utah">UT</option>
  68. <option value="vermont">VT</option>
  69. <option value="virginia">VA</option>
  70. <option value="washington">WA</option>
  71. <option value="west virginia">WV</option>
  72. <option value="wisconsin">WI</option>
  73. <option value="wyoming">WY</option>
  74. </select></td></tr><br/>
  75.    <tr>
  76.       <td><label for="zip">Zip Code:</label></td><td><input type="text" name="zip" size="5" maxlength="5" title="Enter the five digit zip code" tabindex="5" id="zip" /></td>
  77.    </tr>
  78. </table>
  79.  
  80. Save for Future Use?<input type="checkbox" value="y" name="Save Information" title="Save your information for future use"/> <br />
  81. Suscribe Newsletter?
  82. Yes <input type="radio" name="newsletter" value="y" title="Check to suscribe to monthly newsletter" checked="checked" />
  83. No<input type="radio" name="newsletter" value="n" title="Check to NOT suscribe to monthly newsletter" />
  84. <br />
  85. Comments:
  86. <br />
  87. <textarea name="comments" rows="5" cols="40"></textarea>
  88. <br />
  89. <input type="reset" value="Clear" />
  90. <input type="submit" value="Submit" />
  91. </fieldset>
  92.  
  93. </div>
  94. </form>
  95.  
  96. </body>
  97. </html>
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

In Firefox (FF3.5) & Internet Explorer (IE7), your tab order is correct. It follows the order of:

Name, Address, City, State, Zip Code, Future Use (checkbox), Newsletter (radio), Comments, Clear, Submit

If you're trying it out in Dreamweaver, that could be the problem. Direct your browser here to see it on a server:

http://www.codephox.com/test.html
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23458
  • Loc: Woodbridge VA

Post 3+ Months Ago

Works fine for me in FF 3.5 and IE 8

I didn't test any other browsers. Just copied your code and tested it

http://www.alaron-nuclear.com/ozzu/tabindex.html
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23458
  • Loc: Woodbridge VA

Post 3+ Months Ago

UPSGuy wrote:
If you're trying it out in Dreamweaver, that could be the problem.


Most likely. I copied it into HTML Kit and the taborder didn't work in the preview mode rendering as IE or FF either, but worked fine once I put it on a server and viewed in a browser.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23458
  • Loc: Woodbridge VA

Post 3+ Months Ago

As an aside, since it's a homework assignment check your spelling. You spelled subscribe wrong.
Quote:
Suscribe

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.