www.webdeveloper.com
Results 1 to 1 of 1

Thread: Jump Menu Help

  1. #1
    Join Date
    Feb 2011
    Posts
    177

    Question Jump Menu Help

    I think I need to use a jump menu to get this to work. Basically I want someone to choose from the jump menu an album. (American Legion, Christmas Party, Ride to Recover) those are the folders. Say someone selects American Legion then below the jump menu it will auto load all of the images from that folder. Any ideas would be much appreciated. If that doesn't make since let me know ill try to better explain it.

    This is what I have:
    HTML Code:
    <?php
    include "Connections"; 
    $sql="SELECT id, albumname FROM AlbumNames"; 
    $result=mysql_query($sql);
    
    $options="";
    
    while ($row=mysql_fetch_array($result)) {
    
        $id=$row["id"];
        $albumname=$row["albumname"];
        $options.="<OPTION VALUE=\"$albumname\">".$albumname;
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script type="text/javascript">
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    </script>
    </head>
    
    <body>
    <SELECT NAME=options onChange="MM_jumpMenu('parent',this,0)">
      <option value="directory.php" selected>Choose
      <?=$options?>
      </option>
    </SELECT>
    </body>
    </html>
    Last edited by shutterbug; 01-19-2012 at 10:26 AM.

Thread Information

Users Browsing this Thread

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

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