validity problem

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Why is SELECTED invalid? I have the following form...
HTML Code: [ Select ]
<select name="searchFor">
<option value="Username" SELECTED>Username</option>
<option value="Location">Location</option>
<option value="ID">Member ID</option>
<option value="Email">Email</option>
<option value="First Name AND Last Name">Name</option>
</select>
  1. <select name="searchFor">
  2. <option value="Username" SELECTED>Username</option>
  3. <option value="Location">Location</option>
  4. <option value="ID">Member ID</option>
  5. <option value="Email">Email</option>
  6. <option value="First Name AND Last Name">Name</option>
  7. </select>

Although, I can just remove it as it's the first option, but still, why is it bringing it up as invalid?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Whats invalid about it, in what way?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

I just get an error...
Quote:
"SELECTED" is not a member of a group specified for any attribute
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Nevermind, I fixed it... it was supposed to be the following code instead.
HTML Code: [ Select ]
<option value="something" selected="selected">something</option>

Thanks though
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

XHTML DOCTYPE, right ?

The "checked" & "disabled", & "readonly" attributes are the same way.

Code: [ Select ]
<input type="checkbox" name="cb" checked="checked" disabled="disabled" readonly="readonly" />
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Yes, XHTML strict :)

Alright, thanks joebert I'll keep that in mind.
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

I didn't know that either :)
  • littlephoenix
  • Graduate
  • Graduate
  • User avatar
  • Posts: 147

Post 3+ Months Ago

had no clue myself hehe
  • HIDE
  • Newbie
  • Newbie
  • HIDE
  • Posts: 14

Post 3+ Months Ago

who told you that selected keyword is invalid here..i don't think so ...
i have used same case but no any error has been occured......
so your code is right...
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

HIDE wrote:
who told you that selected keyword is invalid here..i don't think so ...
i have used same case but no any error has been occured......
so your code is right...


If it wasn't an XHTML DOCTYPE, you'ld be right.

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 41 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.