|
I have a PHP script that needs to set the default 'SELECTED' option of a select box.
This was very easy before I started thinking in terms in XHTML and web standards, i could just stick SELECTED in the appropriate OPTION element. But know im thinking this isnt the best way to go.
Would the 'default selected option' be classed as part of a page's structure (whereby it can be embedded in the XHTML) or part of its behaviour (whereby we would set it using JS), or is it even part of a page's display (set it in CSS). I think you could argue that the default selected element could be any one of these.
Ive tried putting 'selected' in the element i want and the page does not verify on w3c.org.
So... which is the 'correct' way to go, how do i do this?
Cheers for feedback
|