probably I’m sinking in an empty glass or maybe i’ve spent too many hours on this project, but here it goes: i want to call a php script using jquery from an htm file.
my jquery code:
$.ajax({
type: "POST",
url: "localhost/calculate/vr4/getAmount.php",
data: "from="+ from_date +"&enddate=" + end_date,
success: function(info){
alert("test info : " + info);
}
});
php script:
$testdate=$_POST['from'];
if ($testdate==NULL)
{
echo "No text";
}
else
{
echo "a date";
}
and nothing happends, and i noticed this in the url:
http://localhost/calculate/vr4/summary_q.php?consult_range.x=30&consult_range.y=5
those parameters (consult_range) is the class name for which i have bind the click event with jquery. any pointers?. I’ve tried several code examples from this forum and others and i get the same results. Hope someone answers, i know is kind of late
try this way
$.ajax({
type: “POST”,
url: “http://localhost/calculate/vr4/getAmount.php”,
data: “from=”+ from_date +”&enddate=” + end_date,
success: function(info){
alert(“test info : ” + info);
}
});
or
$.ajax({
type: “POST”,
url: “vr4/getAmount.php”,
data: “from=”+ from_date +”&enddate=” + end_date,
success: function(info){
alert(“test info : ” + info);
}
});