Skip navigation
Currently Being Moderated

W3C error with select elements

Jan 27, 2012 4:23 PM

Tags: #select #html5 #w3c_validator

I am getting the following error message when using the W3C Validator on a HTML5 page in CS5.5:

Line 79 No space between attributes [HTML5]

Line 81 No space between attributes [HTML5]

Line 81 The select element cannot have ,ore than one selected option descendant unless the multiple attribute is specified [HTML5]

Line 82 No space between attributes [HTML5]

Line 82 The select element cannot have ,ore than one selected option descendant unless the multiple attribute is specified [HTML5]

 

The error appears when it checks a dynamic populated list created by Dreamweaver.

For every item in the list, I get the error shown in lines 81 and 82. The line 79 error always appears first..

The page works fine.

 

I did a search for this error on the web, and found that it was reported as a bug in the validator some time ago, but another report says that the bug has now been fixed.

 

When the validator stays on the page for longer than a few seconds with this error, Dreamweaver reports that it has ;lost contact with the  (local) Apache server. Dreamweaver has to be restarted to fix it.

 

Is this a bug in the validator or is it an error in the Dreamweaver list menu code.

 

It happens in any dynamically populated list with Dreamweaver generated with code like this:

 

<select name="pick" size="11" class="selectblue">

    <?php

do { 

?>

    <option value="<?php echo $row_Recordset1['club_index']?>"<?php if (!(strcmp($row_Recordset1['club_index'], $row_Recordset1['club_index']))) {echo "selected=\"selected\"";} ?>>

     <?php echo $row_Recordset1['club_name']?></option>

    <?php

     } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));

       $rows = mysql_num_rows($Recordset1);

       if($rows > 0) {

           mysql_data_seek($Recordset1, 0);

           $row_Recordset1 = mysql_fetch_assoc($Recordset1);

       }

?>

  </select>

Is this a bug in the validator or is it an error in the Dreamweaver list menu code.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points