Results 1 to 3 of 3

Thread: Cant get Pulldown menu working

  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Cant get Pulldown menu working

    I got several PHP pages that need a season ID.

    The BASIC page checks te season VALUE by this
    PHP Code:
    if
      (isset(
    $_REQUEST['id']))
      
    //  is there a POST or GET ?
      //  if so put it in the needed VAR
    {
        
    $Season_ID $_REQUEST['id'];
            }
        
    //if not
    elseif
    (isset(
    $_SESSION['Season_ID']))
            {
       
    // is there a session containing the VAR season_ID ?
      //  if so read put it is Season_ID' .
      
    $Season_ID $_SESSION['Season_ID'];
            }
            
    //if no session to

    else
            {
      
    // ... tha we must us de default value for season_ID.
        
    $Season_ID=$af_current_seasonID;
            } 
    I use the dymanic script to load the NEXT and the PREVIOUS season, this works fine.

    But wat if the visitor wants to jump to a 10 or 20 year back, Then the PREVIOUS option is not good.

    So I want offer a pulldown menu

    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    HTML Code:
    <form>
    <select id=\"ajaxmenu\" size=\"1\">
    	<option value=''>Season?</option>
    	<option value='external/games.php?id=104'>2008-2009</option>
    	<option value='external/games.php?id=103'>2007-2008</option>
    	<option value='external/games.php?id=102'>2006-2007</option>
    	<option value='external/games.php?id=101'>2005-2006</option>
    	<option value='external/games.php?id=100'>2004-2005</option>
    	<option value='external/games.php?id=99'>2003-2004</option>
    	<option value='external/games.php?id=98'>2002-2003</option>
    	<option value='external/games.php?id=97'>2001-2002</option>
    	<option value='external/games.php?id=96'>2000-2001</option>
    	<option value='external/games.php?id=95'>1999-2000</option>
    	</select>
    <input type=\"button\" onClick=\"ajaxcombo('ajaxmenu', 'contentarea')\" value=\"oke\" />
    </form>";
    I can't get it working

    the recieving page is called games.php and the DIV <CONTENT>

    and is this the ONLY
    <script type="text/javascript">
    /***Combo Menu Load Ajax snippet**/
    function ajaxcombo(selectobjID, loadarea){
    var selectobj=document.getElementById? document.getElementById(selectobjID) : ""
    if (selectobj!="" && selectobj.options[selectobj.selectedIndex].value!="")
    ajaxpage(selectobj.options[selectobj.selectedIndex].value, loadarea)
    }
    </script>
    Last edited by markla; 08-03-2008 at 08:33 PM.

  2. #2
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can anybody somebody please please please helpme?

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Where is your DIV with the "content" id?
    - Mike

Bookmarks

Posting Permissions

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