iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-03-2007, 12:35 PM
WebProWorld Member
 
Join Date: Jan 2007
Location: Dallas, Tx
Posts: 26
TheBrownRecluse RepRank 0
Default For XHTML Strict, what is the alternative for SELECT in forms?

I have these lines of code here:

<input type="hidden" name="cPath" value="71_107" />
<input type="hidden" name="sort" value="3a" />

<form action="../index.php" method="get" id="filter">
<select name="filter_id" onchange="this.form.submit()">
<option value="" selected="selected">All Manufacturers</option>
<option value="81">Daewoo</option>
<option value="18">Haier America Trading</option>
</select>
</form>

The select element is the only element that is giving me trouble. I'm trying to find on the internet what would be an alternative, if there is one. as you can see, the select onchange is javascript, and I don't know if removing it would be wise. Can I just simply move the select ame and onchange elsewhere, or what?

I've looked over the internet and have yet to find an answer that addresses my problem.

here is a clue as to what's going on from teh validator itself.

Line 249, Column 67: document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
…ect name="filter_id" onchange="this.form.submit()">

Thank you

-Clif
__________________
Clif Thompson

Last edited by TheBrownRecluse; 08-03-2007 at 12:44 PM. Reason: forgot someting
Reply With Quote
  #2 (permalink)  
Old 08-03-2007, 01:00 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: For XHTML Strict, what is the alternative for SELECT in forms?

As it says in the validator message, you need a container for the select element, such as a <p> tag, because select is considered an inline element. Almost all form elements now need to be contained in a block level element, as form is no longer considered as a block level element.
HTML Code:
<form action="../index.php" method="get" id="filter">
<p>
   <select name="filter_id" onchange="this.form.submit()">
      <option value="" selected="selected">All Manufacturers</option>
      <option value="81">Daewoo</option>
      <option value="18">Haier America Trading</option>
   </select>
</p>
</form>
__________________
The best way to learn anything, is to question everything.

Last edited by wige; 08-03-2007 at 01:02 PM. Reason: Added code
Reply With Quote
  #3 (permalink)  
Old 08-03-2007, 06:26 PM
WebProWorld Member
 
Join Date: Jan 2007
Location: Dallas, Tx
Posts: 26
TheBrownRecluse RepRank 0
Default Re: For XHTML Strict, what is the alternative for SELECT in forms?

Thank you very much. I guess it was one of those CSS fundamentals that I've overlooked, because I couldn't find it on the W3C.

THank you
__________________
Clif Thompson
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xhtml strict 1.0 vs xhtml 1.1 John-pr Web Programming Discussion Forum 9 11-08-2006 03:09 PM
XHTML Strict and links in a new window ADAM Web Design Graphics & Design Discussion Forum 8 08-05-2005 11:06 AM
iFrames and XHTML 1.1 Strict ADAM Web Design Graphics & Design Discussion Forum 3 04-14-2005 01:40 PM
HTML 4.01 Strict freddieb Graphics & Design Discussion Forum 18 02-14-2004 03:31 PM
Strict or Transitional? carbonize Graphics & Design Discussion Forum 14 10-06-2003 12:04 PM


All times are GMT -4. The time now is 09:50 AM.



Search Engine Optimization by vBSEO 3.3.0