CjK
unread,Jun 11, 2010, 10:07:06 AM6/11/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RightJS
Hi,
I do a lot of form-selectbox updating using RightJS. Often, I re-build
select-options using a template and then insert the <options>-html
into the selectbox. So far so good.
Now, when I build an options-list like so:
var options = "
<option selected="selected" value="">-</option>
<option value="00">Value 00</option>
<option value="01">Value 01</option>
<option value="02">Value 02</option>
";
And do something like the following to insert it into my select-input-
control:
$(my-selectbox-id).update(options);
Then the browser (tested in FF 3.6.x) shows the updated selectbox with
the *last* item (here: "Value 02") currently selected. I'd expect that
the '-' entry would be active instead.
Same happens when I try with $(...).clean().insert(options); instead.
Testing with the same options-list using jQuery, the option marked as
"selected" is indeed displayed as active as expected:
jQuery('#' + my-selectbox-id).html(options);
Or am I doing something wrong here?
BTW:
Looking forward to the 1.6.x release, though my most pressing ticket
(#216 - change-events should bubble in IE) is not yet solved. It's
probably a tricky one, since it's a mis-feature of IE, but would be
*very* convenient to have :)
Thanks,
Claus