[jQuery] Re: Setting option with a variable as its value to selected

2009-08-19 Thread Giovanni Battista Lenoci
north ha scritto: I found the issue. It's described here for example: http://csharperimage.jeremylikness.com/2009/05/jquery-ie6-and-could-not-set-selected.html Your code is between this code? $().ready(function() { }); -- gianiaz.net - web solutions via piedo, 58 - 23020 tresivio

[jQuery] Re: Setting option with a variable as its value to selected

2009-08-19 Thread north
Inside $(document).ready(function(), yes... But the link I posted describes the problem I had, and the workaround seems to do its job. :) On 19 Aug., 09:17, Giovanni Battista Lenoci gian...@gmail.com wrote: north ha scritto: I found the issue. It's described here for example:

[jQuery] Re: Setting option with a variable as its value to selected

2009-08-18 Thread Giovanni Battista Lenoci
north ha scritto: $('#mySelect option[value=' + myValue + ']').attr('selected', 'selected'); Maybe this is not what you want to do, but why don't you use this? $('#mySelect').val(myValue); Bye -- gianiaz.net - web solutions via piedo, 58 - 23020 tresivio (so) - italy +39 347 7196482

[jQuery] Re: Setting option with a variable as its value to selected

2009-08-18 Thread north
Hi Giovanni, this seems to work as well. But somehow I'm getting the same error (just connected to another line of code). Mabye I'll have to tear the whole script apart and start over... :) Cheers On 18 Aug., 16:16, Giovanni Battista Lenoci gian...@gmail.com wrote: north ha scritto:

[jQuery] Re: Setting option with a variable as its value to selected

2009-08-18 Thread north
Nobody any clue why $('#mySelect option[value=' + myValue + ']').attr('selected', 'selected'); of code is throwing an error? On 18 Aug., 16:32, north ollo...@web.de wrote: Hi Giovanni, this seems to work as well. But somehow I'm getting the same error (just connected to another line of

[jQuery] Re: Setting option with a variable as its value to selected

2009-08-18 Thread north
I found the issue. It's described here for example: http://csharperimage.jeremylikness.com/2009/05/jquery-ie6-and-could-not-set-selected.html On 18 Aug., 18:09, north ollo...@web.de wrote: Nobody any clue why $('#mySelect option[value=' + myValue + ']').attr('selected', 'selected'); of code