hello there. i am having a hard time to debug this problem of mine.i am supposed to retrieve the value from my jQuery and save it in a PHP variable.
$(document).ready(function()
{
$("#months").change(function(event)
{
$.ajax
({
type: 'post',
url: "monthly_CRD.php",
data:
{
"m": $(this).val()
},
success: function(msg)
{
alert(msg);
},
error: function(msg)
{
alert("An error happened: " +msg);
}
});
});
<div>
<select id="months">
<option value='00'>Month...</option>
<option value='01'>Jan</option>
<option value='02'>Feb</option>
<option value='03'>Mar</option>
<option value='04'>Apr</option>
</select>
</div>
<?php
if (isset($_POST['m']))
{
$m = $_POST['m'];
echo $m;
}
?>
it keeps on giving me An error happened: [objectXMLHttpRequest] in my alert box
please i need this badly.i've been working on this for about 1 week already.i'm new with jQuery so please bare with me.


