JQuery Function Not Defined?

10 pts.
Tags:
Ajax
JavaScript
jquery
PHP
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]
ASKED: May 19, 2010  3:19 PM
UPDATED: May 27, 2011  12:56 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You have too many close braces in your script. Delete one and it should work.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following