www.cecenter.org
I made a very simple ticker to approximate how much energy we have saved our clients. It works fine when I tested it just from the C drive. When I put it on the site it worked fine on FF but not IE. In fact, IE would load half the site and then say that it could not load the site, and then give an error page. If I hit "refresh" the site then shows up properly. Very strange?
It is particularly confusing because it will give an error every-other-time that I reload the page.
Here is my code:
Code:
<script type="text/javascript">
function doSomething()
{
var allsecs = new Date()
var time = allsecs.getTime()
var timeadjust = time - 1166832000000;
moneysaved = 270000000 + .000475647 * timeadjust;
moneysaved = moneysaved.toFixed(2);
var sRegExp = new RegExp('(-?[0-9]+)([0-9]{3})');
while(sRegExp.test(moneysaved))
{
moneysaved = moneysaved.replace(sRegExp, '$1,$2');
}
document.getElementById("numchange").innerHTML = moneysaved;
}
setInterval ("doSomething()" , 1000 );
doSomething();
</script>
This is the doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
Anyone have any ideas?