Okay, I have some jQuery that calls a php file. I have my php file echo out some data to an error log every time it is pulled up to see if it is actually being called, and most times it is, except for the occasional breakdown. I’ve then been able to track it down to my jQuery and I have an alert right before my $.getJSON that will show me the values of my variables (to make sure that I have data) and it always works (even when the occasional breakdown happens) so I’m theorizing that there must be something quirky with my $.getJSON, maybe I’m missing a comma or something? Either way, I’m using IE 7 (mandated by the company that I work for) and maybe there’s a glitch with that browser? I’m just throwing things out here… Here’s my code, can someone help me figure this out somehow? Write to a log file or something? I’m at my wits end with this… Thanks in advance!:
$("#days<?php echo $JavaCnt;?>").change(function(){
var r12 = $('#r12<?php echo $JavaCnt;?>').attr('value');
var std = $('#std<?php echo $JavaCnt;?>').attr('value');
var fnlss = $('#fnlss<?php echo $JavaCnt;?>').attr('value');
var ordq52 = $('#ordq52<?php echo $JavaCnt;?>').attr('value');
var tinv = $('#tinv<?php echo $JavaCnt;?>').attr('value');
var id = $('#id<?php echo $JavaCnt;?>').attr('value');
var days = $('#days<?php echo $JavaCnt;?>').attr('value');
var userid = '<?PHP ECHO $UserID;?>';
var year = '<?PHP ECHO $Year;?>';
var ceiling = '<?PHP ECHO $Ceiling;?>';
var floor = '<?PHP ECHO $Floor;?>';
var diffallowed = '<?PHP ECHO $DiffAllowed;?>';
alert("id="+ id + "&days=" + days + "&userid=" + userid + "&year=" + year + "&ceiling=" + ceiling + "&floor=" + floor + "&diffallowed=" + diffallowed + "&r12=" + r12+ "&std=" + std+ "&fnlss=" + fnlss+ "&ordq52=" + ordq52+ "&tinv=" + tinv)
$.getJSON('AJ_SSAnalysis.php', {'id' : id, 'days' : days, 'userid' : userid, 'year' : year, 'ceiling' : ceiling, 'floor' : floor, 'diffallowed' : diffallowed, 'r12' : r12, 'std' : std, 'fnlss' : fnlss, 'ordq52' : ordq52, 'tinv' : tinv}, parseInfo);
function parseInfo(data)
{
if(data){
$('div#txtHintA<?php echo $JavaCnt;?>').html(data.QTY);
$('div#txtHintB<?php echo $JavaCnt;?>').html(data.STD);
$('div#txtHintC<?php echo $JavaCnt;?>').html(data.TURNS);
if(data.PHPalert){
alert(data.PHPalert);
window.location='<?php echo $_SERVER["PHP_SELF"]."?usid=".$_GET['usid']."&nav_pn=".$_GET['nav_pn'];?>';
}
}
}
}
);
FYI,
I have posted this question on a few other forums not to be annoying but because I’m at my wits end and need help real bad, i appreciate your understanding:
http://www.codingforums.com/showthread.php?p=1074935#post1074935