Thanks a lot!!!!! :-) it works!!!.
Thanks.
I have another issue, how can i display item in a combo box(drop down), based on item selected in another combo box(drop down).
Actually i have items retrieved based on db in combo box.
<TD ><B>combo1:</B></TD>
<select name="step" size="1" class="text" id="step" tabindex="11" onChange="Showitemincombox2(this.form);">\n";
<?php
$selectThis = 0;
$sqlone = mysql_query("SELECT * FROM table1");
while ($sqlonerow = mysql_fetch_array($sqlone)) {
extract($sqlonerow);
if ($selectThis == 0){
print "<option value=\"$step_id\" SELECTED>#$step_id $description</option>\n";
$selectThis = 1;
}
else{
print "<option value=\"$step_id\">#$step_id $description</option>\n";
}
}
print "</select>\n</td>\n";
?>
<TD ><B>combo2:</B></TD>
<td><select name="chance" size="1" class="text" tabindex="11" >\n";
<?php
$sqltwo = mysql_query("SELECT * FROM table2");
while ($sqltworow = mysql_fetch_array($sqltwo)) {
extract($sqltworow);
print "<option value=\"$chance_id\">$percentchance% $definition</option>\n";
}
print "</select>\n</td>\n";
?>
if i select combo1, item #1,item #2, item #3, item #4 the value in combo2, should display item #1, in combo2.
if i select combo1, item #5, the value in combo2, should be changed to the item #2 of combo2 automatically.
How can i do it.
please help.
Thanks