I have a dropdown list with name pid and a submit button in my form. when submit button is clicked i want to pass the value selected in the dropdown list (pid) to this var target_id in the javascript.
<script>
function send(fid)
{
var uid=fid;
alert('ID IS: '+uid);
}
</script>
echo "<select name='pid'>";
//this is in a for loop
echo "<option value=".$id.">".$id."</option>";
//for loop ends
</select>
<input type='submit' value='send' name='send' onclick='send(pid)' id='send'/>
what am i doing wrong here?