Dear users:
 
I'm having some difficulty getting the selected item's display text (i.e. 
'Third') for a dropdown:
 
<select id="weightclass">
  <option value="1">First</option>
  <option value="2">Second</option>
  <option value="3">Third</option>
</select>
 
// using the 'value' property
var mystring = $('weightclass').get('value');    // returns 3
 
var mystring = $('weightclass').get('text');     // returns text for ALL of 
the items
 
Thank you
 
 
 
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to