Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Changing a Combobox content
- From: lists at gazelasport.sk (M)
- Subject: [Javascript] Changing a Combobox content
- Date: Fri Oct 27 17:47:32 2006
Henrique Renn? wrote / nap?sal(a):
> Hello!
>
> I did a map over an image and every time I click on a mapped point it
> changes the content of a combobox (select). It works fine on firefox but
> internet explorer clears the combo's content every time a mapped point
> is clicked. Is it a problem that can be solved?
>
> This is what I did:
>
> A function to change the combo's value:
>
> function change(newvalue)
> {
> document.form_name.select_name.value
> = newvalue;
> }
AFAIK selects don't have value property in standard javascript (that
gecko defines is different). You need to iterate over .options and find
the index of the desired value. Then set .selectedIndex to this index.
- References:
- [Javascript] Changing a Combobox content
- From: Henrique Rennó
- [Javascript] Changing a Combobox content
- Prev by Date: [Javascript] Changing a Combobox content
- Next by Date: [Javascript] Changing a Combobox content
- Previous by thread: [Javascript] Changing a Combobox content
- Next by thread: [Javascript] Changing a Combobox content
- Index(es):