SelectHTMLItemByValue - selects an item in a Combobox/Listbox within a Web page.

This undocumented function is similar to SelectHTMLItem(), except that it selects by value rather than item text.

Syntax:
ret=SelectHTMLItemByValue(,item$[,shift|ctrl])


Go to http://www.w3schools.com/TAGS/tryit....tryhtml_option

Paste in the following, and click "Edit and Click Me >>":

<font class="small">Code:</font><hr /><pre>
&lt;html&gt;
&lt;body&gt;
&lt;select name="MySelect" size=4 multiple="multiple"&gt;
&lt;option value="a"&gt;Volvo&lt;/option&gt;
&lt;option value="b"&gt;Saab&lt;/option&gt;
&lt;option value="c"&gt;Mercedes&lt;/option&gt;
&lt;option value="d"&gt;Audi&lt;/option&gt;
&lt;/select&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><hr />

Then run this script

<font class="small">Code:</font><hr /><pre>
UsePage("Tryit Editor v1.4")
SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "a")
SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "b", shift)
SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "d", ctrl)
</pre><hr />