function sindex()
{
if (sel_agefrom.SelectedIndex == 0 || sel_ageto.SelectedIndex==0)
{
alert (“Select from and to age”);
return false;
}
}
i have above script with dropdown and a command button on page
the command button has OnClick event which eexecutes code behind
if the drop down has selected index as 0 the above alert should popup and the onclick shld not get executed
error
Microsoft JScript runtime error: ‘sel_agefrom’ is undefined