[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread Youri v/d Bogert
Directorie: introductie offertes > Upload Files $(document).ready(function() { /*'folder': 'documenten/' + jQuery ('select :select

[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread Mauricio (Maujor) Samy Silva
Try: ... var selector = $('#selectList'); selector.change(function() { var directory = $('option[selected]').text(); // if you want get the option text or var directory = $('option[selected]').attr('id'); // if you want get the option id ... -Mensagem Original- De: Y vd Bogert

[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread Youri v/d Bogert
Thanks alot james, that solved my problem. I didnt know if i made a var in the function it wasnt public. Thanks! 2009/5/28 James > > In your code: > selector.change(function() { > var directory = selector.val(); >}); > > 'directory' is a local var

[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread James
In your code: selector.change(function() { var directory = selector.val(); }); 'directory' is a local variable. The value of it will not be understood outside of this function, such as in your fileUpload AJAX code. You should set a global variabl

[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread Youri v/d Bogert
That didnt solve the problem, i still get the other value. 2009/5/28 James > > Your 's are suppose to use the 'value' attribute: > > You have: > introductie > > You should use: > introductie > > On May 28, 5:45 am, Y vd Bogert wrote: > > In my html select code i've got the following options: >

[jQuery] Re: $("#selectInput").val()

2009-05-28 Thread James
Your 's are suppose to use the 'value' attribute: You have: introductie You should use: introductie On May 28, 5:45 am, Y vd Bogert wrote: > In my html select code i've got the following options: > >   introductie >   offertes > > > But when i select offertes it always shows my value as intr