Dear All,

I am learning javascript and now trying to get the value of selected combo box using below javascript.. but it does not work.. could any body please help?


function JSGetSelectedItem() {
alert("Hello JSCript " + document.form1.select.options(document.form1.select.selectedindex).text);
}



===

and I call it from my PHP codes..

<select name="select" size="1" onchange="JSGetSelectedItem()">
<?php
for ($i=1;$i<=10;$i++)
{
echo "<option>".$i;
}
?>
</select>