SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    last button checked

    I'm probably very dumb but...
    Here is a bit of code, testing the markup for forms.
    For some reasons, the last button is checked when the checked button should be in the middle of the list.... why?

  2. #2
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    need to see some code there buddy!

  3. #3
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol
    sorry
    Code:
    <form name="test" id="testid" method="post">
    <p>
    <label for="testpassword">
      Password: 
      <input type="password" name="testpassword" maxlength="30" />
    </label>
    </p><p>
    <label for="username">
      Username: 
      <input type="text" name="username" maxlength="30" />
    </label>
    </p><p>
    <label for="blah">
      Blah: 
      <input type="password" name="blah" maxlength="30" />
    
    </label>
    </p><textarea name="wesh" rows="20" cols="20"></textarea>
    
    <fieldset>
    <legend>Buttons</legend>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    <label for="blahblah">
    
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" checked />
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    <label for="blahblah">
      Blah:
      <input type="radio" name="blahblah" value="tut" />
    </label>
    
    </fieldset><p>
    <input type="submit" value="Send This Form" />
    
    </form>

  4. #4
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    UK, London
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Label should be applied to the ID not the name. Every label needs to be connected to one item only. As for the checked bit: have you tried checked="checked" instead?
    Could also be a problem that each radio button has the same value...
    Chris Heilmann
    Blog | Articles | Binaries


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •