Results 1 to 3 of 3

Thread: js event?

  1. #1
    Join Date
    Aug 2008
    Posts
    23
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default js event?

    <option>yes</option>
    <option>no</option>
    When I select yes in the dropdown without pressing submit button, it will show an input field. is it possible in javascript? could you please help me?

  2. #2
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default

    HTML Code:
    <form name="aform" action="#">
    <select onchange="this.form.elements['nofkids'].style.display = this.value">
    <option value="">Yes</option>
    <option value="none">No</option>
    </select>
    <input type="text" name="nofkids">
    </form>
    This will also hide the field when you select "No".

  3. #3
    Join Date
    Aug 2008
    Posts
    23
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default

    thank you very much

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
  •