www.webdeveloper.com
Results 1 to 7 of 7

Thread: If checkbox is checked.. then selection on dropdown is must...

  1. #1
    Join Date
    Feb 2011
    Posts
    5

    If checkbox is checked.. then selection on dropdown is must...

    Need a javascript function...

    If a checkbox is checked, then corresponding dropdown selection is must...

    Please help me with this...

    Thanks

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    post the code you have so far and we can try to help

  3. #3
    Join Date
    Feb 2011
    Posts
    5
    Thanks for reply...

    Here is sample of code..

    If a user check the checkboxes... its mandatoryy tht he/she should also select from dropdown...

    IF he checked and didn't slect anything... We need to show error...


    Code:
    <form name=form1 action="" >
    Name: <input type="text" name ="name" > <br>
    Email: <input type="text" name ="email" > <br>
    
    <input type="checkbox" name="Radio" value="Radio" >Radio 
     <select name="DropFeild1" id="DropFeild1">
    <option value="">Select #</option>
    <option value="1">Radio1</option>
    <option value="2">Radio2</option>
    <option value="3">Radio3</option>
    </select><br><br>
    
     <input type="checkbox" name="T.V" value="T.V" >T.V
    <select name="DropField2" id="DropFeild2">
    <option value="">Select #</option>
    <option value="1">T.V1</option>
    <option value="2">T.V2</option>
    <option value="3">T.V3</option>
    </select><br><br>
    
     <input type="checkbox" name="Internet" value="Internet">Internet
     <select name="DropField3" id="DropFeild3">
    <option value="">Select #</option>
    <option value="1">Internet1</option>
    <option value="2">Internet2</option>
    <option value="3">Internet3</option>
    </select><br><br>
    
    
    <input type="submit" value="submit">
    </form>

  4. #4
    Join Date
    Mar 2010
    Posts
    2,803
    You can do that with javascript. Do you want to learn how to do it or do you just want someone to provide the code for free?

    If you are interested in learning, have a go at it and if you get stuck post back with your html and javascript and we can try to help you get it working.

  5. #5
    Join Date
    Feb 2011
    Posts
    5
    Thanks for the reply..

    I have already tried it....

    Can you please help me with javascript function....

  6. #6
    Join Date
    Mar 2010
    Posts
    2,803
    yep no problem

    But my crystal ball is being repaired atm so I can't use it to view your javascript code . You'll have to post your code for me.

  7. #7
    Join Date
    Feb 2011
    Posts
    43

    Cool

    hye..

    i'm facing the same problem..if you have success, can you share your knowledge with me..thanks..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles