dcsimg
Set focus on newly added select box value
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Salima_Lalani
Posted On:   Monday, March 10, 2003 05:44 PM

Hi,


My select box consists of various string values , say "xyz", "aaa" etc.


If i add a new value it should get added to the select box. I am doing by adding the newly created value to the options array. Now when i add the new value let's say "abc" , then the focus should be on the newly created element in the select box.


how to do that?


please reply


thanks


Salima

Re: Set focus on newly added select box value

Posted By:   Firat_Tiryaki  
Posted On:   Tuesday, March 11, 2003 01:09 PM

the below statement sets the focus to the last element of selection.


document.formName.selectName.options[document.formName.selectName.length-1].selected=true;

About | Sitemap | Contact