Hello Nick!!!<br><br>Thanks for your reply. I just changed the property &quot;value&quot; to &quot;text&quot; and it worked fine.<br><br>Regards<br><br><div><span class="gmail_quote">On 10/28/06, <b class="gmail_sendername">
Nick Fitzsimons</b> &lt;<a href="mailto:nick@nickfitz.co.uk">nick@nickfitz.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 27 Oct 2006, at 20:57:33, Henrique Rennó wrote:<br><br>&gt; Hello!<br>&gt;<br>&gt; I did a map over an image and every time I click on a mapped point<br>&gt; it changes the content of a combobox (select). It works fine on
<br>&gt; firefox but internet explorer clears the combo's content every time<br>&gt; a mapped point is clicked. Is it a problem that can be solved?<br>&gt;<br>&gt; This is what I did:<br>&gt;<br>&gt; A function to change the combo's value:
<br>&gt;<br>&gt; function change(newvalue)<br>&gt; {<br>&gt; document.form_name.select_name.value = newvalue;<br>&gt; }<br>&gt;<br><br>Unlike something like a text input field, a select doesn't have a<br>value: it has a selected option, which provides the value. To set the
<br>selected item, you can do one of two things; pass the number of the<br>option you want to select:<br><br>function setSelectedOption(index) {<br>&nbsp;&nbsp;&nbsp;&nbsp;document.form_name.select_name.selectedIndex = index;<br>}<br><br>or you can scan the options array looking for the item with the
<br>chosen value:<br><br>function setSelectedOptionByValue(value) {<br>&nbsp;&nbsp;&nbsp;&nbsp;var select = document.form_name.select_name; // getting it into a<br>variable makes it faster<br>&nbsp;&nbsp;&nbsp;&nbsp;for (var option = 0; option &lt; select.options.length
; option++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (select.options[option].value == value) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select.selectedIndex = value;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><br>(I haven't tested any of this, but it should work :-)<br>
<br>HTH,<br><br>Nick.<br>--<br>Nick Fitzsimons<br><a href="http://www.nickfitz.co.uk/">http://www.nickfitz.co.uk/</a><br><br><br><br>_______________________________________________<br>Javascript mailing list<br><a href="mailto:Javascript@LaTech.edu">
Javascript@LaTech.edu</a><br><a href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a><br></blockquote></div><br><br clear="all"><br>-- <br>Henrique