[UPHPU] Javascript question

Justin Hileman justin at justinhileman.info
Sat Jul 11 07:06:58 MDT 2009


thebigdog wrote:
> wow...tons more code than
>
> myselect.selectedIndex = 3; // way simple


Don't try to break out the brevity card when you're arguing against 
jQuery. Try this instead:

$("#sample").val(3);

vs.

var myselect=document.getElementById("sample");
myselect.selectedIndex = 3;


-- 
justin
http://justinhileman.com



More information about the UPHPU mailing list