View Full Version : Resolved Intervals and Auto Refresh (not AJAX)

07-29-2009, 02:23 PM

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'

there are more functions before the end of the script tag, and then later:

<SCRIPT type="text/javascript">

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)

Philip M
07-29-2009, 02:40 PM
<SCRIPT type="text/javascript">

The name of the function called by setIinterval() must be in quotes.

"Money does not bring happiness, but it does enable you to be miserable in comfort". - Philip M's personal mantra

07-29-2009, 02:42 PM
heh, thanks, its always something mind boggelingly simple