AndP
07-29-2009, 01:23 PM
Hello
I have a script where I'm using "AJAST" to load and execute new scripts on an interval, the relevant parts of the code are below:
<SCRIPT type="text/javascript">
function refpage(){
var head = document.getElementsByTagName('head')[0]
var node = ""
var node = document.createElement('script')
node.type = 'text/javascript'
node.src = 'refresh.php?d=29&m=07&y=2009'
head.appendChild(node)
}
there are more functions before the end of the script tag, and then later:
<body>
<SCRIPT type="text/javascript">
setInterval(refpage(),10000)
</script>
I had this working about a month ago, but now that I've come back to add things to the rest of the system it appears to have stopped
Either I have changed something in this code accidently or have somehow gone back to an older version, as I remember fixing this before (but not how I did so)
The function works when called by a button elsewhere on the page, but the interval doesn't operate on any of the browsers that I've tested with (IE6, IE7 and Firefox3)
I have a script where I'm using "AJAST" to load and execute new scripts on an interval, the relevant parts of the code are below:
<SCRIPT type="text/javascript">
function refpage(){
var head = document.getElementsByTagName('head')[0]
var node = ""
var node = document.createElement('script')
node.type = 'text/javascript'
node.src = 'refresh.php?d=29&m=07&y=2009'
head.appendChild(node)
}
there are more functions before the end of the script tag, and then later:
<body>
<SCRIPT type="text/javascript">
setInterval(refpage(),10000)
</script>
I had this working about a month ago, but now that I've come back to add things to the rest of the system it appears to have stopped
Either I have changed something in this code accidently or have somehow gone back to an older version, as I remember fixing this before (but not how I did so)
The function works when called by a button elsewhere on the page, but the interval doesn't operate on any of the browsers that I've tested with (IE6, IE7 and Firefox3)