Home » HTML » HTML_QuickForm » Bug #4899
hierselect produces invalid XHTML
Details
| Submitted | 2005-07-23 16:46 UTC |
|---|---|
| From | pupeno at pupeno dot com |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 4.4.0 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-07-23 16:46 UTC] pupeno at pupeno dot com
Description:
------------
The element 'hierselect' produces invalid XHTML (Strict)
because the second <select> is empty and it seem that is
not valid. From w3's validator (see the 'another
pessibility'):
Line 324, column 8: end tag for "select" which is not
finished
</select></td>
Most likely, You nested tags and closed them in the
wrong order. For example <p><em>...</p> is not acceptable,
as <em> must be closed before <p>. Acceptable nesting is:
<p><em>...</em></p>
Another possibility is that you used an element (e.g.
'ul') which requires a child element (e.g. 'li') that you
did not include. Hence the parent element is "not
finished", not complete.
One easy fix I though is to include an empty option by
default in the second select, anyway it is going to be
overwritten by the javascript.
Thanks.
[2005-07-23 20:50 UTC] pupeno at pupeno dot com
I added options, but since it is a hierselect the options
are not put in the XHTML element but they are added
dynamically by a Javascrip script.
If your solution can be used, then I'd like to know how to
add options to the second select in a hierselect as an
element and not as javascript (and have the javascript part
work as well obviously).
Note: my testing case is an array of option for the first
select and another array for the second but for some
options of the first there's no options on the second and
the first option of the first is empty on the second, maybe
that is why the <select> ends up being empty.
At any rate I'd like to know hon to do what you describe it
to use it as a workaround.