<html>
<head>
<title>chat</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
var win=window.frameElement.name;
</script>
</head>
</html>
<?php
/*$mysqli = new mysqli("localhost", "root", "", "library");
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;}
else
{
$mysqli->real_query("SELECT name, msg FROM message WHERE receiver = 'aditya' AND name = 'julu' OR receiver = 'julu' AND name = 'aditya' LIMIT 0 , 30;");
$res=$mysqli->use_result();
while($row=$res->fetch_assoc())
{
echo ">" .$row['name'].":". $row['msg'] . "\n <br>";
}
}*/
?>
hey guys.
this might be easy for some of u , in the js section of the code i have a variable 'win'....now i want to send this win value from javascript to the php section....i tried the below ajax inside thejs section but it didn't work .........what am i doing wrong????
$.ajax({
type: "POST",
url: "id_test.php",
data:{'variable': win},
success: function(msg){
}
});

New Topic/Question
Reply



MultiQuote




|