CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   Trying to cal a php page within jquery but no data returned (http://www.codingforums.com/showthread.php?t=246639)

guitarlass 12-18-2011 05:41 PM

Trying to cal a php page within jquery but no data returned
 
hi ,
this is my code. i want to return data using a php page after processing a query within it.

$.post('check_booked.php', { room:roomv, srtdate:sdatev, eddate:sdatev},
function(data){
alert( data);
});
before completing php page i test using online code which returned nothing.. i don't know what wrong,
as i have understood anything within that php page eg: html code should be returned by this code. this is the test code i used and which didn't return anything.

$.post("check_booked.php", function(data) {
alert("Data Loaded: " + data);
});
and i have
<h1>hi</h1>
in my php page

Please help me solve this. much appreciate help..!

Dormilich 12-19-2011 08:52 PM

well, if the PHP code isn’t working, you can’t expect the AJAX to return something.

Arnaud 12-20-2011 11:03 AM

Post your PHP code as well.

Hint: do you "ECHO" something on the PHP side (as you should do) or did you try to "RETURN" something?


All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.