• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Multiple selection criteria/dropdowns to links


    Hi Folks!

    Still new here and just getting started with webpages after some false-starts.


    This case has me stumped. I need to have 2 drop down selections - the user picks 1 from each - and then a submit button to match those 2 results to a certain youtube video.


    For example:
    The first dropdown could have "Mom", and "Dad", and the second could have "kid1" and "kid2" - each combo would link to a different video after clicking the submit button (that would have those 2 people in it). I can't figure out how to essentially have a series of if/then statements based on the dropdown selections.


    so like
    if var1=Mom and var2=kid1 then url=whatever
    if var1=Mom and var2=kid2 then url=whatever2


    I was pointed to this answer awhile ago but it doesn't seem to quite jive.

    any help would be super-appreciated!




    <title>Youtube playlist search</title>


    <script type="text/javascript">

    function go_get(){
     var base_url = 'http://www.youtube.com/embed?listType=search&list=';
     var search_field = document.getElementById('yourtextfield').value;
     var target_url = base_url + search_field;
     var ifr = document.getElementById('youriframe');
     return false;


    <form onsubmit="go_get(); return false;" >
     <input type="text"  id="yourtextfield"/>
     <input type="submit" value="Search Playlists" />

    <iframe id="youriframe" width="640" height="360" ></iframe>