[Solved] Referring to a dropdown box in jQuery script

0

I can get a value from a text box this way:

var textboxvalue = $(‘.textboxvalue input[type=text]’).val();

If I use:

var feet = $(‘select[name=feet]’).val();

it will give me the a value, but it is not the option value. 

I have set the “Reporting Values” to “Custom” in the layout for the drop down box.

So how do I get a option value from a drop down box?

 

Thanks

JP L asked

    Best answer

    0
    JP L 14 Rep.

    Solved:

    var feet =  parseInt($(‘.feet :selected’).text());

     

    JP L answered
      ×

      Login

      Question stats

      • Active
      • Views280 times
      • Answers1 answer
      • Followers0 followers