10 pts.
 JQuery Function Not Defined?
Hi there,
I'm trying to set a php session variable from a radio button. The idea is that a jquery function is called which in turns calls a seperate php file using AJAX which does the work but it just keeps telling me the function is not defined. The function is in the head tags:
<script language="javascript" type="text/javascript">
function updatevalue() {
  var s = $('#radio1').val();
  var url = "outflightcalc.php";
  $.post(url,{outflight:s},function(data){
    $('#currentflight').html(data);
  }
}
}
</script>
And it's called here in the same page:
<td  align="center" height="19"><input type="radio" value="'.$row["Id">.'" name="radio1"  onclick="javascript:updatevalue();"> </td>
And the php file called is here:
<?php
start_session();
if(isset($_POST['outflight'])){
  $q = $_POST['outflight']; 
 
    $_SESSION['Itin'] = $q;
    echo "Updated";
  }
?>
Any ideas??
[td height=""19"" align=""center""> [/td]

Software/Hardware used:
ASKED: May 19, 2010  3:19 PM
UPDATED: May 27, 2011  12:56 PM

Answer Wiki:
You have too many close braces in your script. Delete one and it should work.
Last Wiki Answer Submitted:  October 2, 2012  7:37 pm  by  lenduz   90 pts.
All Answer Wiki Contributors:  lenduz   90 pts. , Tbogard   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _