|
| |
|
|
RumRat
Posts: 5 Joined: 11/16/2005 From: Wisbech, Cambs, England Status: offline
|
Error Messages - Javascript - Access denied - 11/16/2005 7:50:02
Got a coding problem with an Advent Calendar and wonder if anyone can help? Basically, there are 24 numbered images (gif) set at random in a grid on the first page, 1.html, which when clicked on, will be replaced by another image (jpg). After all 24 are open, the grid should be replaced by another html page, 25.html, with the complete picture, but, when I click on day 24, I get the following error message: 'An error has occurred in the script on this page. Line: 84 Char: 15 Error: Access is denied. If I go into the FrontPage Temporary file, I find the page in there I think this has something to with the second page, 25.html, but I don't know where the start point is for counting the Line Numbers. I downloaded all the script from a Portuguese site and the webmaster did help me out at first, but I haven't heard from him since. I have been into a forum and tried what was suggested there, Ran Regsvr32 urlmon.dll, IE Enable Third Party Browser Extensions and unchecked DisableScript Debugging. There is a Restart facility on the page, but if I click this, I get the same Error Message, but; Line: 96 Char: 2 I am at a loss and wonder if anyone can help? I would dearly love to have and Interactive Advent Page this year. TIA.
|
|
|
|
RumRat
Posts: 5 Joined: 11/16/2005 From: Wisbech, Cambs, England Status: offline
|
RE: Error Messages - Javascript - Access denied - 11/16/2005 8:06:21
Can't help me if I don't post the code!! Sme of it is in Portuguese, but that shouldn't matter: <SCRIPT language=JavaScript>var hoje = new Date(), janelas= new Array(25), isCookie; function init() { var i,c=0; if(document.cookie.length>0) isCookie=true; else { document.cookie="advent=000000000000000000000000;"; if(document.cookie.length>0) isCookie=true; else isCookie=false; } ckOffset=document.cookie.indexOf("advent=")+6; if(isCookie) { for(i=1;i<25;i++) { janelas=document.cookie.charAt(ckOffset+i); if(janelas=='1') { len=document.images['i'+i].src.length; document.images['i'+i].src=document.images['i'+i].src.substr(0,len-3)+"jpg"; } } teste(); } return; } function dia(d) { var str="advent=", len, i, ano, expira; if(d <= hoje.getDate()) { len=document.images['i'+d].src.length; if(janelas[d]=='1') { document.images['i'+d].src=document.images['i'+d].src.substr(0,len-3)+"gif"; janelas[d]='0'; } else { document.images['i'+d].src=document.images['i'+d].src.substr(0,len-3)+"jpg"; janelas[d]='1'; } for(i=1;i<25;i++) str+= janelas; ano=hoje.getYear(); if(ano<1000) ano+=1900; // patch NN4 expira=new Date(ano+1,hoje.getMonth(),hoje.getDate(),hoje.getHours(),hoje.getMinutes(),hoje.getSeconds()); str += ";expires="+expira.toGMTString(); document.cookie = str; setTimeout("teste()",5000); } else { document.images['i'+d].src='janela_fechada.gif'; setTimeout("espera("+d+")",1000); } return; } function teste() { var i,c=0; if(hoje.getDate()>=24) { for(i=1;i<25;i++) if(janelas=='1') c+=i; if((c==300)) document.location="25.html"; } return; } function espera(d) { document.images['i'+d].src=d+'.gif'; return; } function reiniciar() { if (document.cookie.length>0) document.cookie="advent=000000000000000000000000;"; document.location="1.html"; return; }</SCRIPT>
|
|
|
|
RumRat
Posts: 5 Joined: 11/16/2005 From: Wisbech, Cambs, England Status: offline
|
RE: Error Messages - Javascript - Access denied - 11/16/2005 11:22:11
Seems like the problem must be on my computer, either the settings in the browser, or something else. I got no error messages on any other web pages, so I don't know what the problem is. I found out that the pages are working OK when I carried out a test run after loading to my web space and trying it out. If anyone does have any suggestions, please do not hesitate to let me know.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|