i have the following code:
<li>Have you read the <?php echo link_to('FAQ','util/faq') ?> ?
<select id="yesnolist" onChange="getChoice(this.value)">
<option value="yes" selected="selected">Yes</option>
<option value="no">No</option>
</select>
</li>
<input type="hidden" name="text" size=30 id="yesandno">
<?php
if ($_GET['yesandno'] == "no")
{
echo "anything!!!!!!!!!!!!!!!!!!!";
}
?>
then my java script for getCoice():
function getChoice(val)
{
yesNo = new Array("Yes", "No");
var getsel = document.contactus.yesnolist.value;
var e = document.getElementById("yesnolist");
var strUser = e.options[e.selectedIndex].value;
document.contactus.yesandno.value = strUser;
alert(document.contactus.yesandno.value);
return strUser;
}
my alert will gove yes or no depending on what i chose in the dropdown
but HOWCOME it does not go into the if ($_GET['yesandno'] == "no") ????
please help???