Form Help

Discussion in 'Web Design & Coding' started by Timuwine, Dec 3, 2003.

  1. Timuwine

    Timuwine Guest

    I know this might sound silly but...

    Is there a way that I can make a drop down list form, where I can have people choose what song they would like to listen to when there enter my site? Not using javascript.

    Thanks
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    This should work i I got it right. ;)

    Code:
    <form name="songForm" method="post" action="nextPage.html">
      <select name="song" onChange="document.songForm.submit()">
        <option value="1">Song 1</option>
        <option value="2">Song 2</option>
        <option value="3">Song 3</option>
      </select>
    </form>
     
  3. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    he said not using JavaScript

    so pretty much do that, as far as I know as long as there is only one element in a form you can just press enter once selecting what you want, so just remove the onChange part I think
     
  4. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Yeah, but nothing about me not using it. :p
    Oh well a submit button will do to:
    Code:
    <form name="songForm" method="post" action="nextPage.html">
      <select name="song">
        <option value="1">Song 1</option>
        <option value="2">Song 2</option>
        <option value="3">Song 3</option>
      </select>
      <input type="submit" value="Choose">
    </form>
     
  5. Timuwine

    Timuwine Guest

    hey thanks alot you guys, i'm trying it out now, i'll post again later and tell you if it worked