I really dont know why this isnt working!
<script src="js/jquery.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript">
function updateVAL()
{
var f = document.getElementById("nu");
var val=f.value;
alert(val); // it displays the value properly
$.post("getDATA.php", {id: val}); // I sent the variable with jquery
}
</script>
getDATA.php
$value=$_POST['id'];
echo $value;
and when I access getDATA.php to see if it was sent I get this:
Notice: Undefined index: id in C:\Users\dan...
why the variable 'id' isnt set ? why is isnt passed to the server ?
Any help would be appreciated :) Cheers,
dan.
valcontain?id? Like this:$.post("getDATA.php", {"id": val});$_POST['id']to some file instead ofecho. i guess you will see it.