...

View Full Version : Disabling Values On A JumpMenu



tomyknoker
06-06-2006, 03:02 PM
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"...

Arty Effem
06-06-2006, 10:30 PM
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)


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.

tomyknoker
06-07-2006, 02:00 AM
I tried it but still doesn't work...

Arty Effem
06-07-2006, 02:37 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum