In case someone else needs to do this, I'll share something I just learned (read: wasted a bunch of time on):

If you want to dynamically select an option within a select element, the following won't work (using jQuery):

$('option').attr('selected', 'selected');


You have to use selectedIndex on the select, like this:

$('select').get(0).selectedIndex = value;


It's interesting that the first option doesn't work since this does:

$('input').attr('disabled', 'disabled');

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to