CodingIE weirdness - help meee

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Ally  
 To:  ALL
30584.1 

http://dump.untogether.co.uk/New%20Ents/temp.htm

 

Load that page in IE. It should count up to 100 in the middle then show the navigation bar. That works fine.

 

However, try reloading it. Now it doesn't work. If you reload enough times the javascript eventually stops firing altogether.

 

Close IE, restart and load the page up, and it's fine.

 

WTF?

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ally     
30584.2 In reply to 30584.1 
Working fine here, both with F5 and the reload button.

Using IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 if that's any help.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Peter (BOUGHTONP)     
30584.3 In reply to 30584.2 

How weird. Repeatedly?

 

I just tried on my housemates computer downstairs and it does the same thing.

0/0
 Reply   Quote More 

 From:  Extrobe (ALDREDD)  
 To:  Ally     
30584.4 In reply to 30584.1 
messes up for me as well - ie 7
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Extrobe (ALDREDD)     
30584.5 In reply to 30584.4 

As long as I'm not alone, then.

 

It's utterly mad- I thought it might be an image caching thing (the script works through image onLoads), but it turns out IE stops processing any Javascript you throw at it, even alert()s. Gaah.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ally     
30584.6 In reply to 30584.3 
Yup. Pressed F5 two or three times, then hit reload. Worked each time.

This connection does have an image processing proxy on though, which may well have something to do with it?
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Peter (BOUGHTONP)     
30584.7 In reply to 30584.6 
Well, I thought it was image caching. But IE stops processing any javascript after a while. Here, anyway.

Basically, I'm at a complete loss. I guess I'll just keep having to remake it until by weird chance IE starts liking it. Sigh.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Ally     
30584.8 In reply to 30584.7 
Every time I reload it loads one less image. WTF ARGH
0/0
 Reply   Quote More 

 From:  Extrobe (ALDREDD)  
 To:  Ally     
30584.9 In reply to 30584.8 
each time i refresh it, the counter stops at a lower number!
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Ally     
30584.10 In reply to 30584.8 
Hm, when I take out the stuff that works out the percentage I get a message saying "Stack overflow". Interesting.
0/0
 Reply   Quote More 

 From:  andy  
 To:  Ally     
30584.11 In reply to 30584.1 
try:

javascript code:
test[doneimgs].src = image_url[doneimgs]+"?r="+Math.random();


..where appropriate.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  andy     
30584.12 In reply to 30584.11 

Already tried that, cheers. Instead I have a huge problem of "stack overflow at line 0", which a quick Google tells me is the kind of problem no-one ever seems to solve.

 

Or post saying how.

0/0
 Reply   Quote More 

 From:  Ally  
 To:  Ally     
30584.13 In reply to 30584.12 
Apparently it's because of recursion. Which my script has a lot of, as the function calls itself 23 times. How I can avoid this I don't know.
0/0
 Reply   Quote More 

 From:  andy  
 To:  Ally     
30584.14 In reply to 30584.13 
This seems to work fine, and with no recursion:

js code:
var t = new Array();
function fireloading() {
	image_url[0] = "images/bottom.en/welcome_off.png";
	image_url[1] = "images/bottom.en/events_off.png";
	image_url[2] = "images/bottom.en/photos_off.png";
	image_url[3] = "images/bottom.en/win_off.png";
	image_url[4] = "images/bottom.en/touch_off.png";
	image_url[5] = "images/bottom/options_off.png";
	image_url[6] = "images/bottom.en/welcome_on.png";
	image_url[7] = "images/bottom.en/events_on.png";
	image_url[8] = "images/bottom.en/photos_on.png";
	image_url[9] = "images/bottom.en/win_on.png";
	image_url[10] = "images/bottom.en/touch_on.png";
	image_url[11] = "images/bottom/options_on.png";
	image_url[12] = "images/bottom/alternate1.png";
	image_url[13] = "images/bottom/alternate1_left.png";	  
	image_url[13] = "images/bottom/alternate1_right.png";	
	image_url[14] = "images/bottom/alternate2.png";
	image_url[15] = "images/bottom/alternate2_left.png";	  
	image_url[16] = "images/bottom/alternate2_right.png";	  
	image_url[17] = "images/bottom/alternate3.png";
	image_url[18] = "images/bottom/alternate3_left.png";	  
	image_url[19] = "images/bottom/alternate3_right.png";	
	image_url[20] = "images/bottom/alternate4.png";
	image_url[21] = "images/bottom/alternate4_left.png";	  
	image_url[22] = "images/bottom/alternate4_right.png";		 
	image_url[23] = "images/bottom/options_left.png";
	totalimgs = image_url.length - 1;
 
 
	for (i=0;i<image_url.length;i++) {
		t[i] = new Image();
		t[i].onload = bang;
		t[i].src = image_url[i];
	}
}
function bang() {
	doneimgs++;
	if (doneimgs == totalimgs) {
		delete t;
		new Effect.BlindDown('bottombar',{duration: 0.5});
	}
}


bang! I dunno why it's double-spaced, the code-highlighter's getting freaky with it.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  andy     
30584.15 In reply to 30584.14 
quote:
I dunno why it's double-spaced, the code-highlighter's getting freaky with it.
One of the mods has added a double-spacing filter to annoy Trigger.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  andy     
30584.16 In reply to 30584.14 

Chaars. I had a layout similar to that, but I think there's a bit of a problem with it.

 

Basically, the way I was doing it before loads the images in sequence, wheras that one kicks off the loading all the same time (I think). For some reason this causes IE to misbehave and stick at 91% on the odd reload, which would irritate me intensely.

 

Weirdly, I think I've found that the problem was the percentage display itself- setting the innerHTML property was causing the stack overflow. Now I've taken that out it all works. I think.

 

I strongly suspect I'll be reverting to your method eventually though- I can see this recursion thing coming back to haunt me.

0/0
 Reply   Quote More 

 From:  andy  
 To:  Ally     
30584.17 In reply to 30584.16 
Have only ever used all-at-once loops to preload images before - browsers should be able to handle it. I guess you could do a semi-recursion thing - load images in loops of 10 or something? I dunno. Good jazz it's working anyway.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  andy     
30584.18 In reply to 30584.17 

http://dump.untogether.co.uk/New%20Ents/temp.htm

 

I hope it works, anyway.

0/0
 Reply   Quote More 

 From:  Extrobe (ALDREDD)  
 To:  Ally     
30584.19 In reply to 30584.18 
'stack overflow at line 0'?
0/0
 Reply   Quote More 

 From:  Ally  
 To:  Extrobe (ALDREDD)     
30584.20 In reply to 30584.19 

<destroys head against wall>

 

It works fine here. Argh. Ctrl-F5ed? The old HTML might be caching. Maybe.

0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  41–43

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats