ajax is not running please help
Even the if else block is running properly,
- $(document).ready(function(){
$('#loadingGif').hide();
$('#selectCourse').change(function(){
if($(this).val())
{
$('#loadingGif').show();
var courseName= $(this).val();
var data = 'func=getFee&courseName='+courseName;
$.ajax({
type:'POST',
url:"../SQLnew.php",
data: data,
success: function(fees){
$('#totalFee').val(fees);
$('#loadingGif').hide();
}
});
}
else
{
$('#loadingGif').hide();
}
});
});
on php
- <?php
include 'include/library.php';
$courseName= $_POST['courseName'];
$course="SELECT * FROM courses WHERE courseName = 'dwd'";
$rs = mysql_query($course,$con);
$row = mysql_fetch_array($rs);
echo $row['fees'];
?>
Please Help me.