Hello Nick!!!<br><br>Thanks for your reply. I just changed the property "value" to "text" 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> <<a href="mailto:nick@nickfitz.co.uk">nick@nickfitz.co.uk</a>> 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>> Hello!<br>><br>> I did a map over an image and every time I click on a mapped point<br>> it changes the content of a combobox (select). It works fine on
<br>> firefox but internet explorer clears the combo's content every time<br>> a mapped point is clicked. Is it a problem that can be solved?<br>><br>> This is what I did:<br>><br>> A function to change the combo's value:
<br>><br>> function change(newvalue)<br>> {<br>> document.form_name.select_name.value = newvalue;<br>> }<br>><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> 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> var select = document.form_name.select_name; // getting it into a<br>variable makes it faster<br> for (var option = 0; option < select.options.length
; option++) {<br> if (select.options[option].value == value) {<br> select.selectedIndex = value;<br> break;<br> }<br> }<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