i got this php file 'check.php' that checks for changes ,and showing a counter for posts !!
now, i cannot figure it out in ajax how to point the request to check if something as changed when the php file is executed?
how do i get the ajax to check that something as changed?
here is my starting ajax file
please help me out with this ,it's a week that im serching for result for this ,i tryed million of combinations ,and no success !!
please help or point me to the right direction!!
thanx
Code:
$show_data="SELECT * FROM bidding_main WHERE bid_id='$bid_id' "; $show_data_query=mysql_query($show_data); $num_show_data=mysql_num_rows($show_data_query); $sqlno="SELECT * FROM bidding_details WHERE bid_id=$bid_id "; $queryno=mysql_query($sqlno); echo "<table width='517' border='0' cellspacing='0' cellpadding='0'>"; echo " <tr>"; $rem=$max_bid-$numno; if($rem<=0) { echo "0"; } else { echo "<td bgcolor='#FFFFFF' align='center'><font color='red'><b>הצעות לסגירה: $rem </b></font></td>"; }"</td>"; echo "</tr>"; echo "</table>";
how do i get the ajax to check that something as changed?
here is my starting ajax file
Code:
function loadXMLDoc(url, callBack) { if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = callBack; req.open("POST", url, true); req.send(null); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = callBack; req.open("POST", url, true); req.send(); } } } function RefreshEngine( now) { var url="check.php" if (now) url+=''; loadXMLDoc(url, RefreshResult; } function RefreshResult () { //here im goint to have the second result }
please help or point me to the right direction!!
thanx
Comment