Simplified Code -- Retrieving the Drop Down menu selected items in a java script function???????
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Laddu_Babu
Posted On:   Monday, January 27, 2003 04:28 PM

function test() { document.frm_test.lst_id.options(1).selected = true; document.frm_test.lst_id.options(3).selected = true; selectItemIndex = document.frm_test.lst_id.selectedIndex; alert(selectItemIndex); alert(document.frm_test.lst_id[selectItemIndex].value); } ]]>]]> I am trying to retrieve the value of the selected drop down menu value from the form in the page. I am doing this by getting the selected index first and then accessing the value. The JavaSCript alert prints the index of the selected item right but it does'nt give me the value of the selected item... 1 2 3 4 5 6 7    More>>

I am trying to retrieve the value of the selected drop down menu value from the form in the page. I am doing this by getting the selected index first and then accessing the value. The JavaSCript alert prints the index of the selected item right but it does'nt give me the value of the selected item...

















   <<Less

Re: Simplified Code -- Retrieving the Drop Down menu selected items in a java script function???????

Posted By:   Brian_Glodde  
Posted On:   Monday, January 27, 2003 06:23 PM

Try it with giving the option a value:


About | Sitemap | Contact