Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Urgent checkbox and radiobutton help

    Hi <all>

    I need this tricky solution which is urgent..pls do help me out.

    I have a form with about 20-25 controls on it and at the end is the submit button.
    After the submit (at bottom of form i need) the following:

    MESSAGE : incoming (radio button) outgoing (radio button)

    If incming is checked i need 4 checkboxes A/B/C/D
    If outgoing is selected i need 4 checkboxes A1/B1/C1/D1

    These checkboxes should become visible on form ONLY when appropriate radio button is clicked..AND i want all these at END /bottom of my form..

    How do i do this???
    Pls do help.
    Regards
    vij
    vijay...life is awesome!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this :

    Code:
    <html>
    <head>
    <title>Select</title>
    <script language="JavaScript">
    function disp(divName)
    {
     document.getElementById(divName).style.display="block";
    }
    function hide(divName)
    {
     document.getElementById(divName).style.display="none";
    }
    </script>
    </head>
    <body bgcolor="#FFFFFF">
    
    <!--BEGIN FORM-->
    <form name="form1">
    <input type="radio" name="radio1" onClick="disp('div1');hide('div2');" checked> Incoming
    <input type="radio" name="radio1" onClick="disp('div2');hide('div1');"> Outgoing
       <!--BEGIN CHECKBOX SET 1-->
       <div id="div1" style="display:none">
       <input type="checkbox" value="a"> A
       <input type="checkbox" value="b"> B
       <input type="checkbox" value="c"> C
       <input type="checkbox" value="d"> D
       </div>
       <!--END CHECKBOX SET 1-->
       <!--BEGIN CHECKBOX SET 2-->
       <div id="div2" style="display:none">
       <input type="checkbox" value="a1"> A1
       <input type="checkbox" value="b1"> B1
       <input type="checkbox" value="c1"> C1
       <input type="checkbox" value="d1"> D1
       </div>
       <!--END CHECKBOX SET 2-->
    </form>
    <!--END FORM-->
    
    </body>
    </html>

  • #3
    New Coder
    Join Date
    Aug 2002
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi premshree..
    It works absolutely fine EXCEPT for one small problem which was there earlier too.

    The two radio buttons plus checkboxes INFACT it gets positioned ABOVE the TITLE /HEADER of my form.I want these controls
    incoming and outgoing to be positioned at the bottom of my form as the last control NOT the first ones at top.

    I embedded the code at the bottom after my last control that is the Submit button but still gets positioned at top ..
    WHY?
    vijay...life is awesome!

  • #4
    New Coder
    Join Date
    Aug 2002
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    THANKX A LOT..
    I got it worked out..
    Thankx premshree.....
    Vij
    vijay...life is awesome!


  •  

    Posting Permissions

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