i am writing a system in PHP (LAMP) and the users are reporting intermittent errors.
if they get an error and they refresh the page it sorts its self out (although after a few refreshes the browser hangs)
the error takes the form of rubbish being printed to the page, values and data are interpreted incorectly (strike through text and wierd symbols)
i asked them to send the source and this is what was returned
i have noticed that numbers are being written to the document (left aligned as if its an empty file and in the middle of functions, table tags etc)
i have indicated the numbers with a trailing hash e.g a5#, 191#, 192#, 190#.
any ideas
Code: Select all
a5#
<html>
<head>
<title>Summary</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="PIP.css" rel="stylesheet" type="text/css">
2#
<s
191#
cript language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM
192#
_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.framesїn.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=dїn])&&d.all) x=d.allїn]; for (i=0;!x&&i<d.forms.length;i++) x=d.formsїi]їn];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layersїi].document);
if(!x && d.getElement
191#
ById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(argsїi]))!=null) { v=argsїi+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function tmt_winPrint(id){
if(window.print()){
var d=eval(id)==nul
190#
l||eval(id+".closed");
if(!d){eval(id+".print()");}}
}
function MM_timelinePlay(tmLnName, myID) { //v1.2
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_TimeїtmLnName];
i
191#
f (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
if (myID == tmLn.ID) { //if Im newest
setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLnїi];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = spri
94#
te.keyFramesї0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFramesїnumKeyFr-1]) {//in range
keyFrm=1;
for (j=0; j
2
<s
191#
prite.values.length; j++) {
props = sprite.valuesїj];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.objїprops.prop] = propsїfNew-firstKeyFr];
else sprite.objїprops.prop2]їprops.prop] = propsїfNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFramesїkeyFrm]) keyFrm++;
190#
if (firstTime || fNew==sprite.keyFramesїkeyFrm-1]) {
if (props.prop2 == null) sprite.objїprops.prop] = propsїkeyFrm-1];
else sprite.objїprops.prop2]їprops.prop] = propsїkeyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
} }
}
fun
190#
ction MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_TimeїtmLnName];
if (numGotos != null)
if (tmLn.gotoCount == null) tmL
191#
n.gotoCount = 1;
else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
jmpFwd = (fNew > tmLn.curFrame);
for (i = 0; i < tmLn.length; i++) {
sprite = (jmpFwd)? tmLnїi] : tmLnї(tmLn.length-1)-i]; //count bkwds if jumping back
if (sprite.charAt(0) == "s") {
numKeyFr = sprite.keyFrames.length;
firstKeyFr = sprite.keyFramesї0];
lastKeyFr = sprite.keyFramesїn
d5#
umKeyFr - 1];
if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFramesїkeyFrm]; keyFrm++);
for (j=0; j
2
<s
190#
prite.values.length; j++) {
props = sprite.valuesїj];
if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
if (sprite.obj != null) {
if (props.prop2 == null) sprite.objїprops.prop] = propsїpropNum];
else sprite.objїprops.prop2]їprops.
190#
prop] = propsїpropNum];
} }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
}
tmLn.curFrame = fNew;
if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}
function MM_timelineStop(tmLnName) { //v1.2
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
if (document.MM_Time == null) MM_initTimelines(); //if *ver
191#
y* 1st time
if (tmLnName == null) //stop all
for (var i=0; i<document.MM_Time.length; i++) document.MM_Timeїi].ID = null;
else document.MM_TimeїtmLnName].ID = null; //stop one
}
function MM_initTimelines() { //v4.0
//MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
var ns = navigator.appName == "Netscape";
var ns4 = (ns && parseInt(navigator.appVersion)
190#
== 4);
var ns5 = (ns && parseInt(navigator.appVersion) > 4);
document.MM_Time = new Array(1);
document.MM_Timeї0] = new Array(5);
document.MM_Timeї"Timeline1"] = document.MM_Timeї0];
document.MM_Timeї0].MM_Name = "Timeline1";
document.MM_Timeї0].fps = 15;
document.MM_Timeї0]ї0] = new String("behavior");
document.MM_Timeї0]ї0].frame = 5;
document.MM_Timeї0]ї0].va
190#
lue = "tmt_winPrint('self')";
document.MM_Timeї0]ї1] = new String("behavior");
document.MM_Timeї0]ї1].frame = 30;
document.MM_Timeї0]ї1].value = "MM_showHideLayers('prnt','','show')";
document.MM_Timeї0]ї2] = new String("behavior");
document.MM_Timeї0]ї2].frame = 45;
document.MM_Timeї0]ї2].value = "MM_timelineGoto('Timeline1','1')";
document.MM_Timeї0]ї3] = new String("
191#
behavior");
document.MM_Timeї0]ї3].frame = 1;
document.MM_Timeї0]ї3].value = "MM_timelineStop('Timeline1')";
document.MM_Timeї0]ї4] = new String("behavior");
document.MM_Timeї0]ї4].frame = 2;
document.MM_Timeї0]ї4].value = "MM_timelinePlay('Timeline1')";
document.MM_Timeї0].lastFrame = 45;
for (i=0; i<document.MM_Time.length; i++) {
document.MM_Timeїi].ID = null;
196#
document.MM_Timeїi].curFrame = 0;
document.MM_Timeїi].delay = 1000/document.MM_Timeїi].fps;
}
}
//-->
</script>
</head>
<body onLoad="MM_timelineGoto('Timeline1','1')" >
<div id="prnt" style="position:absolute; left:12px; top:40px; width:44px; height:16px; z-index:1"><a href="#"><img src="Images/print.jpg" width="34" height="35" border="0" onClick="MM_timelineGoto('Timeline1','2')
40#
" onMouseUp="MM_showHideLayers('prnt','','hide')"></a></div>
<p>
2
<s
2a
pan class="PageHeader">Summary Report for
a
17/11/2004
18
</span></p>
<br>
<br>
ef
<table border="0" align="left" cellpadding="0" cellspacing="0" class="color1">