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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stack overflow at line 0 in ie

Status
Not open for further replies.

edelwater

Programmer
Jun 29, 2000
203
EU
i had this stack overflow error without any indication of a line number or whatever in ie. i found this website through altavista when looking on the subject and found messages indicating it should be caused by arrays &gt; 99.<br><br>However i found that in my case the error was caused by images that were preloaded and later on called from another frame while a new frameset was build. If the images were loaded too late it caused the stack overflow ( no images could be exchanged).<br><br>i currently have build a timout:<br><br>function whatever() {<br>if (document.image.whatimage) {<br>&nbsp;&nbsp;&nbsp;// it exists<br>} else {<br>&nbsp;&nbsp;&nbsp;setTimeout(&quot;whatever()&quot;,500)<br>} <br>}<br><br>to wait for the images to be loaded, somehow this<br>doesnt work, i guess timeout starts a seperate thread<br>or something ? The images still on intermediate basis<br>do not exist.<br>any way to be absolutely sure the image has loaded ?<br><br><br><br><br>
 
Dear edelwater,<br><br>&gt;any way to be absolutely sure the image has loaded ?<br><br>Well maybe kinda... it depends. The javascript Image object has an 'object.onload' event and a 'object.complete' property. According to many references I have seen the support is flakey in both Nutscrap and IE. (not even implemented prior to versions 4 of both I believe)<br><br>Anyway I have seen the 'complete' property return true in IE 4 and 5 and Nutscrap 4.06<br><br>The onload event only appears to work from the 'img' tag so it's not useful for loading images into script variables. Anyway I write my code using the 'complete' property but who knows what the heck it does in all the various browsers. Hopefully the worst thing it would do is return false even though the image is downloaded so your script would not change the images ever, at least it wouldn't produce an error dialog to the user eh?<br><br>Basically I try to stay away from image swapping since it appears to be somewhat unreliably implemented. Of course you could just live with the error dialogs!<br><br>Done now... did you actually read this far? What a terrible post but I'm not going to fix it.<br><br>-pete
 
thanks for your reply,<br>indeed i also had the same thoughts: writing around the<br>warnings, that is: in the case of a non-loaded image (unfortunately in my case it has to be put in a variable)<br>i wanted to place a default pic there so the warning wouldnt be showed.<br>unfortunately again i can never be absolutely sure that my check for if the image exists is true you tell me ?<br>i dont use a rollover but a replacement of a logo according to various environments.<br><br>hmmm interesting :) <br><br><br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top