Click to See Complete Forum and Search --> : How Do I ?


Hunny
08-29-2005, 01:53 AM
i want to get the title of combo box items how do i get that .
CODE GOES HERE:
<select name=course_name size=18 onClick='call(this.form)'>";

while($rows=mysql_fetch_row($query))
{
echo "<option value='$rows[0]'>$rows[1]";
}i wan to get the value which is in $rows[1] in the function called in javascript. how do i get that ?

Fang
08-29-2005, 03:15 AM
document.forms['formName'].course_name.options[Index].value

geniestar
08-29-2005, 03:24 AM
how

Hunny
08-30-2005, 03:08 AM
i got the answer by my self .. through the code "document.forms['formName'].course_name.options[Index].value" .. i got the value of $rows[0].. but i have to get the value of $rows[1] and i have done it by giving the id to the option and then call that in java script.