Hi all.
I'm new to a company and we run SolarWinds here for our network monitoring. There is a home grown script that runs our call center. When I upgraded SolarWinds recently, the home grown script now bombs out after a few hours. I don't know much about scripting so I was wondering if someone could take a look at this script and see if there is anything that you see that would make this bomb after a certain amount of time.
I greatly appreciate any help I can get. (Remember, I didn't write this so don't blast me if it's horribly written)
<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
var iframeSrc = new Array;
//iframeSrc[0] = "//iframeSrc[1] = "//iframeSrc[2] = "//iframeSrc[3] = "iframeSrc[0] = "iframeSrc[1] = "iframeSrc[2] = "iframeSrc[3] = "//Look into using NetworkMap.aspx instead of MapView.aspx...
var intervalVar;
var interval = 30; // seconds between iframe switching
var currentSrc = 0;
var lastPage = iframeSrc.length - 1;
var playing = false;
function switchPage() {
var randomnumber=Math.floor(Math.random()*100000);
$('#myIframe').fadeTo(1000,0,function() {
currentSrc++;
if (currentSrc > lastPage) currentSrc = 0;
document.getElementById("myIframe").src = iframeSrc[currentSrc] + "&random=" + randomnumber;
}).fadeTo(1000,1);
}
function slideshow() {
if (playing) {
playing = false;
clearInterval(intervalVar);
}
else {
playing = true;
intervalVar = setInterval(switchPage, interval * 1000);
}
}
function loadpage() {
document.getElementById("myIframe").src = iframeSrc[0];
slideshow();
}
</script>
<title>Support Page Viewer</title>
</head>
<body leftmargin="0" topmargin="0" onload="loadpage()">
<iframe id="myIframe" src="" width="75%" scrolling="NO" frameborder="0" height="75%" ></iframe>
<iframe id="callsframe" src=" width="25%" scrolling="NO" height="75%"></iframe>
<iframe id="agentsframe" src=" width="100%" height="25%" scrolling="no" marginheigh="0" marginwidth="0"></iframe>
</body>
</html>
I'm new to a company and we run SolarWinds here for our network monitoring. There is a home grown script that runs our call center. When I upgraded SolarWinds recently, the home grown script now bombs out after a few hours. I don't know much about scripting so I was wondering if someone could take a look at this script and see if there is anything that you see that would make this bomb after a certain amount of time.
I greatly appreciate any help I can get. (Remember, I didn't write this so don't blast me if it's horribly written)
<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
var iframeSrc = new Array;
//iframeSrc[0] = "//iframeSrc[1] = "//iframeSrc[2] = "//iframeSrc[3] = "iframeSrc[0] = "iframeSrc[1] = "iframeSrc[2] = "iframeSrc[3] = "//Look into using NetworkMap.aspx instead of MapView.aspx...
var intervalVar;
var interval = 30; // seconds between iframe switching
var currentSrc = 0;
var lastPage = iframeSrc.length - 1;
var playing = false;
function switchPage() {
var randomnumber=Math.floor(Math.random()*100000);
$('#myIframe').fadeTo(1000,0,function() {
currentSrc++;
if (currentSrc > lastPage) currentSrc = 0;
document.getElementById("myIframe").src = iframeSrc[currentSrc] + "&random=" + randomnumber;
}).fadeTo(1000,1);
}
function slideshow() {
if (playing) {
playing = false;
clearInterval(intervalVar);
}
else {
playing = true;
intervalVar = setInterval(switchPage, interval * 1000);
}
}
function loadpage() {
document.getElementById("myIframe").src = iframeSrc[0];
slideshow();
}
</script>
<title>Support Page Viewer</title>
</head>
<body leftmargin="0" topmargin="0" onload="loadpage()">
<iframe id="myIframe" src="" width="75%" scrolling="NO" frameborder="0" height="75%" ></iframe>
<iframe id="callsframe" src=" width="25%" scrolling="NO" height="75%"></iframe>
<iframe id="agentsframe" src=" width="100%" height="25%" scrolling="no" marginheigh="0" marginwidth="0"></iframe>
</body>
</html>