pongo el código de todo a ver si así se entiende mejor.
Código:
de javascrit no tengo ni idea la verdad :S
<?php
$sql="SELECT * from grupo where habilitado='SI'";
$sql1="SELECT * from servicio where habilitado='SI' and id_grupo="select grupo" ";
$sql2="SELECT * from lista_opcines where habilitado='SI' and id_servicio="select servicio" ";
$result=mysqli_query($c, $sql)
$result1=mysqli_query($c, $sql1)
$result2=mysqli_query($c, $sql2)
$row=mysqli_fetch_array($result);
$row1=mysqli_fetch_array($result1);
$row2=mysqli_fetch_array($result2);
echo "<table border='0' align='center'>
<form class='formu' action='../pedido.php' method='POST' name='formu'>
<tr>
<td> Grupo:
<select name='grupo'>
<option value=".$row["id_grupo"].">".$row["grupo"]."</option>
</select>
</td>
<tr>
<td>
<select name='servicio'>
<option value=".$row1["id_servicio"].">".$row1["servicio"]."</option>
</select>
</td>
</tr>
<tr>
<td>
<select name='opciones'>
<option value=".$row2["id_lista"].">".$row2["lista"]."</option>
</select>
</td>
</tr>
<tr>
<td align='center'>
<input type='submit' value='Realizar Pedido' name='enviar'>
</td>
</tr>
</form>
</table>";
?>
Un saludo y gracias


