Thread: Optional list

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0

    Optional list


    Hey!

    I want to create HTML page. For an example, title is HTML. Now, if i put my mouse over HTMl then option A and option B will appear.. If i select option A then another set of question will appear. After selecting all proper options I would get my answer on final page. Can you please help me with this.
  2. #2
  3. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    65
    Rep Power
    8
    this would be accomplished with javascript. i am not very strong with js but here is a script i wrote in an external .js document for something very similar:

    Code:
    window.onload = init_all;
    
    function init_all()
    {	
    	// stop script if getElementById not working in this browser
    	if( !document.getElementById )
    		return;
    
            function hide_select()
    	{
    		//alert('hide');
    		var sc_dropdown = document.getElementById("sc_dropdown");
    		sc_dropdown.style.display 	= 'none';
    	}
    	
    	function show_select()
    	{
    		//alert('show');
    		var sc_dropdown = document.getElementById("sc_dropdown");
    		sc_dropdown.style.display 	= 'block';
    	}
    
            var input_gc 	= document.getElementById("input_gc");
            var input_sc 	= document.getElementById("input_sc");
    
    	input_gc.onclick	= hide_select;
    	input_sc.onclick	= show_select;
    } // close init_all
    Freelance Web Developer | Web Hosting |
    PHP Applications
    Web Development, Hosting, Graphic Design, SEO

IMN logo majestic logo threadwatch logo seochat tools logo