I am new to jQuery and am trying to copy an example from a website I found that uses AJAX I need to take the PHP variable and pass it to another PHP page without refreshing the entire page. I have come up with the following code below but I am getting a syntax error
Uncaught SyntaxError: Unexpected token )
Here is my code:
$("Button").click(function(){
var textBox = $("textBox").val();
$.post("script.php",
{textBox: textBox},
function(data,status)
)};
)};
My PHP page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<script type='text/javascript' src='script.js'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></$
<title>LCD Display</title>
</head>
<body>
<form id="lcd" action="script.php" method="post">
<input name='textBox' type='text' />
<input type='submit' id= 'Button' value='Press to see something cool'/>
</form>
<div id='ResponseDiv'>
</div>
<iframe id="video" src="http://192.168.0.11:8081" height="120" width="160"></iframe>
</body>
</html>
I am also getting the following errors but I think they may be related to the syntax error:
Resource interpreted as Document but transferred with MIME type multipart/x-mixed-replace: "http://192.168.0.11:8081/".
Resource interpreted as Document but transferred with MIME type image/jpeg: "http://192.168.0.11:8081/".