On Thu, 2006-10-26 at 13:13 -0500, Richard Lynch wrote:
> On Thu, October 26, 2006 12:14 pm, Robert Cummings wrote:
> > On Thu, 2006-10-26 at 11:43 -0500, Richard Lynch wrote:
> >>
> >> $last_day = 31; //calculated from date()/mktime() etc
> >> for ($day = 1; $day <= $last_day; $day++){
> >> $selected = $chosen_day == $ ? 'selected="selected"' : '';
> >> echo " <option $selected>$day</option>\n";
> >> }
> >>
> >> I don't *think* the w3c requires/recommends a value= in there, if
> >> the
> >> label *IS* the value, but can live with it either way...
> >> echo " <option value=\"$day\" $selected>$day</option>\n";
> >> is fine.
> >
> >>From the XHTML standard:
> >
> > http://www.w3.org/TR/html/#diffs
> >
> > We read the following:
> >
> > XML does not support attribute minimization. Attribute-value pairs
> > must be written in full. Attribute names such as compact and
> > checked
> > cannot occur in elements without their value being specified.
> >
> > CORRECT: unminimized attributes
> >
> > <dl compact="compact">
> >
> > INCORRECT: minimized attributes
> >
> > <dl compact>
> >
> > So even if you aren't using XHTML yet, it's wise to get into the
> > practice.
>
> A) I see no need, now or ever, to use XHTML.
YMMV.
> B) What you are referencing has ZERO BEARING on the question of not
> having ANY value attribute at all, as far as I can see:
> <option>5</option>
> This does not have a minimized VALUE attribute.
> It has *NO* value attribute at all.
Ahh, I just re-read your email, and well... I need to go drink some
coffee :)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php