tinku
01-27-2005, 04:18 PM
Hi,
I have two list/record, When one item is selected it should check through the other list and if present choose that item and get the focus on the list.
here is the code. Can anyone please help on what exactly I should do here or help in correcting the error.
function getname()
{
for(i=0;i<window.document.custom_form.custbodycust_itemid_list.length;++i)
{
if(window.document.custom_form.custbodycust_itemid_list.options[i].selected){
window.document.custom_form.custbodycust_itemid_list.SelectedIndex = i;
break;
}
}
}
I have two list/record, When one item is selected it should check through the other list and if present choose that item and get the focus on the list.
here is the code. Can anyone please help on what exactly I should do here or help in correcting the error.
function getname()
{
for(i=0;i<window.document.custom_form.custbodycust_itemid_list.length;++i)
{
if(window.document.custom_form.custbodycust_itemid_list.options[i].selected){
window.document.custom_form.custbodycust_itemid_list.SelectedIndex = i;
break;
}
}
}