Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setInterval Access is denied

Status
Not open for further replies.

kopite

Programmer
Apr 17, 2001
5
GB
Hi,

The web page runs in IE4 and IE5.5 and reloads every 60 seconds without a problem then all of a sudden when it reloads (this may be after 10 minutes, 2 hours etc) I get an Access is denied error pointing at:

id = self.setInterval('countdown();',1000);

This is the relevant code in the page.

<!-- code -->

<input type=text name=kk value=100 size=4>

<script language=javascript>

var id;

function countdown()
{
jj.kk.value--;
if ( jj.kk.value == 0 )
{
self.clearInterval(id);
gogogo();
}
}

function gogogo()
{
location.reload(true);
}

id = self.setInterval('countdown();',1000);

</script>

<!-- end of code -->
 
and, replace

<input type=text name=kk value=100 size=4>

with

<form name=jj>
<input type=text name=kk value=100 size=4>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top