Forums

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.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38609
    burtflaxton
    Participant

    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.

    http://i.imgur.com/vc6AA.png

    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 != isFront() ? 1 : 0?>)
    {
    return;
    }
    var mode = '';

    foreach( $levelsExceptRoot as $level )
    {
    ?>
    var select = jQuery('.Select');
    if( !selectHasValue( select ) ) {
    switch( mode ) {
    case 'hide':
    select.hide();
    select.prev('label').hide();
    break;
    case 'disable':
    select.attr('disabled','disabled');
    break;
    }
    }
    }
    ?>
    }



    decorateUnavailableSelections();

    -or-

    This one is quite large, so I will give a pastie link instead.

    Here is the other js file.

    #104739
    filipeb
    Member

    I’ve just tried it and nothing got disabled. What version of FF are you using?

    #104740
    Senff
    Participant

    Not able to reproduce either. Can you give us the steps you take (starting at the home page) where this situation occurs?

    #104743
    burtflaxton
    Participant

    The issue was fixed, sry guys!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.