validity problem

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8212
  • Loc: USA
  • Status: Offline

Post April 1st, 2008, 10:22 pm

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?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 1st, 2008, 10:22 pm

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post April 1st, 2008, 10:30 pm

Whats invalid about it, in what way?
#define NULL (::rand() % 2)
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8212
  • Loc: USA
  • Status: Offline

Post April 1st, 2008, 10:38 pm

I just get an error...
Quote:
"SELECTED" is not a member of a group specified for any attribute
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8212
  • Loc: USA
  • Status: Offline

Post April 1st, 2008, 10:40 pm

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
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13458
  • Loc: Florida
  • Status: Offline

Post April 1st, 2008, 11:53 pm

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" />
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8212
  • Loc: USA
  • Status: Offline

Post April 2nd, 2008, 5:50 pm

Yes, XHTML strict :)

Alright, thanks joebert I'll keep that in mind.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 10, 2004
  • Posts: 2194
  • Loc: Canada
  • Status: Offline

Post April 2nd, 2008, 5:56 pm

I didn't know that either :)
  • littlephoenix
  • Graduate
  • Graduate
  • User avatar
  • Joined: Oct 31, 2006
  • Posts: 149
  • Status: Offline

Post April 2nd, 2008, 8:49 pm

had no clue myself hehe
  • HIDE
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 05, 2008
  • Posts: 14
  • Status: Offline

Post April 5th, 2008, 3:44 am

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
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13458
  • Loc: Florida
  • Status: Offline

Post April 5th, 2008, 4:50 am

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.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 119 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.