- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › How can I stop jquery from disabling a drop down.
For some reason when I choose the first option in the drop down the 2nd populates, but the sytle becomes disabled. I just want a way to stop the style from becoming disabled. If I go into firebug and delete the style disabled=”disabled” I can select an option and it works perfectly.
Here is the site –> http://mbrpexhauststore.com/
I have been working on this for a few weeks, so I would appreciate any help or info anyone can give. I am very new to javascript, so even the basic information will help me.
Here is an image of what it looks like in firebug.
I have a feeling that the issue resides somewhere in one of these two js files.
function selectHasValue( select ) {
var hasValue = false;
select.find('option').each( function() {
if( '' != jQuery(this).val() && 0 != jQuery(this).val() ) {
hasValue = true;
}
});
return hasValue;
}
var decorateUnavailableSelections = function() {
if( 1 != =$main->isFront() ? 1 : 0?>)
{
return;
}
var mode = '=$mode?>';
foreach( $levelsExceptRoot as $level )
{
?>
var select = jQuery('.=$level?>Select');
if( !selectHasValue( select ) ) {
switch( mode ) {
case 'hide':
select.hide();
select.prev('label').hide();
break;
case 'disable':
select.attr('disabled','disabled');
break;
}
}
}
?>
}
=$content?>
decorateUnavailableSelections();
-or-
This one is quite large, so I will give a pastie link instead.
I’ve just tried it and nothing got disabled. What version of FF are you using?
Not able to reproduce either. Can you give us the steps you take (starting at the home page) where this situation occurs?
The issue was fixed, sry guys!