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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer very simple radio button ...simple problem

    Hello webmasters,

    I need to create 1 main category . and 3 sub categories usng radio button... when user clicks on "main category{radio button}" all three "sub categories{radio buttons}" should be dispalyed ...here is code for subcategories

    Code:
        <input type="radio" name="sub category1" value="Times Roman"/> Times Roman
    
        <input type="radio" name="sub category2" value="Courier"/> Courier
    
        <input type="radio" name="sub category3" value="Verdana"/> Verdana
    this should be embeded within "main category" which is again radio button ...only when user checks "main category radio button" all sub categories should be dispalyed ..please help me to fix this problem..expecting your response asap

  • #2
    New to the CF scene
    Join Date
    Dec 2011
    Location
    Southern California
    Posts
    8
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Try using jQuery.....after your import jQuery...

    PHP Code:
    <script>
        $().
    ready(function(){
            $(
    '#cat1').click(function(){
                $(
    '#subcat1').toggle();
            })
        });
    </script> 
    and

    PHP Code:
    <input type="radio" value="Times Roman" id="cat1"/> Fonts
    <div id="subcat1" style="display:none;">
        <
    input type="radio" name="sub category1" value="Times Roman"/> Times Roman
        
    <input type="radio" name="sub category2" value="Courier"/> Courier
        
    <input type="radio" name="sub category3" value="Verdana"/> Verdana
    </div
    I'm sure you can figure the rest out... :-)

  • #3
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by theTortoise View Post
    Try using jQuery.....after your import jQuery...

    PHP Code:
    <script>
        $().
    ready(function(){
            $(
    '#cat1').click(function(){
                $(
    '#subcat1').toggle();
            })
        });
    </script> 
    and

    PHP Code:
    <input type="radio" value="Times Roman" id="cat1"/> Fonts
    <div id="subcat1" style="display:none;">
        <
    input type="radio" name="sub category1" value="Times Roman"/> Times Roman
        
    <input type="radio" name="sub category2" value="Courier"/> Courier
        
    <input type="radio" name="sub category3" value="Verdana"/> Verdana
    </div
    I'm sure you can figure the rest out... :-)
    thanks alot for your reply ...code looks everthing is correct ...but still its not working only fonts can be checked but does not show sub categories when checked ...:< ...i think we are very closer... do we have to use onclick..??any other ways????please help me....
    Last edited by sriducati; 12-19-2011 at 01:20 AM.


  •  

    Posting Permissions

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