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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Disabling Values On A JumpMenu

    I have some JumpMenu's on my HTML page, some of the fileds don't have any values but if they are selected they take the user back to the index page... Any ideas? Example is here: http://www.australianairtours.com.au/tours.htm...

    The text I am referring to is "Select A Tour ( )" and also on the first JumpMenu for example, "PREMIUM AIR TOURS"...

  • #2
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by tomyknoker
    I have some JumpMenu's on my HTML page, some of the fileds don't have any values but if they are selected they take the user back to the index page... Any ideas? Example is here: http://www.australianairtours.com.au/tours.htm...

    The text I am referring to is "Select A Tour ( )" and also on the first JumpMenu for example, "PREMIUM AIR TOURS"...
    Try commenting-out the function MM_jumpMenu, and replace it with this substitute, which ignores empty values. NOTE: the first parameter must be passed as a variable not as a string.
    I.E.
    Change: MM_jumpMenu('parent',this,0) to: MM_jumpMenu(parent,this,0)

    Code:
    function MM_jumpMenu(targ, selObj, restore) // (Changed)
    { 
     var locn=selObj.options[selObj.selectedIndex].value;
     
     if( locn != "" )
      targ.location=locn;
      
     if(restore)
      selObj.selectedIndex=0; 
    }
    Having said that, script-dependent navigation methods should have a fallback for users with scripting disabled or unavailable. It is academic to discuss the percentage of such users, and from an accessibility standpoint it is insufficient to display a warning about the site's inoperability. In this case, the selects should be script-generated, with a <noscript> block displaying perhaps tabulated links as appropriate.
    Last edited by Arty Effem; 06-07-2006 at 03:30 AM.

  • #3
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I tried it but still doesn't work...

  • #4
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by tomyknoker
    I tried it but still doesn't work...
    Then I would need to see exactly how the code stands. Using that modified function, selecting any option with no value should do nothing.


  •  

    Posting Permissions

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