I want to randomly select an id or value from one of the many option items in my select tag. Also I was wandering how do I quickly count all the option tags in my select tag, and how can I randomly call an ID field efficiently so if I hit refresh, it will just pick another random id? This is for a testing environment to auto fill a form out for qa people.
Examples
<select id="selectVendor">
<option value="55" selected="selected">Company A</option>
<option value="56">Company B</option>
<option value="57">Company XYZCYK</option>
... </select>
Finally I want to put the value of my selected id into my form field... Eventually I want to use ajax to populate my entire form with the randomly selected identifier when the page first loads. thx
<input type="text" id="txtCompany" value="empty" />