Project

General

Profile

« Previous | Next » 

Revision df5501dc

Added by N0YB over 11 years ago

Make select option XHTML compliant for "Number of lines to display".

http://validator.w3.org/check
"SELECTED" is not a member of a group specified for any attribute
<option value="7" SELECTED >7</option>

The name and VI delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified
<option value="7" selected >7</option>

"VI delimiter" is a technical term for the equal sign. This error message means that the name of an attribute and the equal sign cannot be omitted when specifying an attribute. A common cause for this error message is the use of "Attribute Minimization" in document types where it is not allowed, in XHTML for instance.

How to fix: For attributes such as compact, checked or selected, do not write e.g <option selected ... but rather <option selected="selected" ...

View differences:

usr/local/www/widgets/widgets/log.widget.php
134 134
		Number of lines to display: 
135 135
		<select name="filterlogentries" class="formfld unknown" id="filterlogentries">
136 136
		<?php for ($i = 1; $i <= 20; $i++) { ?>
137
			<option value="<?php echo $i;?>" <?php if ($nentries == $i) echo "SELECTED";?>><?php echo $i;?></option>
137
			<option value="<?php echo $i;?>" <?php if ($nentries == $i) echo "selected=\"selected\"";?>><?php echo $i;?></option>
138 138
		<?php } ?>
139 139
		</select>
140 140

  

Also available in: Unified diff