it wont work on page load the way I wrote it because I wanted to see the value change when I selected something different, just remove the onchange event and it will.
On Oct 23, 2:36 pm, CroNiX <[email protected]> wrote: > OK, misunderstood due to my fast reading. I just tried this in > mooshell and it seems to work. > > $('myselect').addEvent('change', function(){ > if($("myselect").getElement(":selected")) { > $("option-resut").set("text", $("myselect").getElement > (":selected").text)} > > else { > $("option-resut").set("text", "not found") > > } > }); >
