trouble with my theme and ie6

trouble with my theme and ie6

by mandy honeyman -
Number of replies: 4
Hello,

I am experiencing a problem with my theme (customised with a drop down menu only at the top of home page).

Every single page that ie6 loads up appears to get stuck so the user has to wait for ages until the page (whichever page) finishes loading before being able to click on anything or fill anything out. This doesn't happen with ie7 or firefox.

If I use the standard theme, there is also no problem, every page loads as fast as anything.

Has anyone experienced similar problems, found any solution, have any ideas?

cheers
Mandy
Average of ratings: -
In reply to mandy honeyman

Re: trouble with my theme and ie6

by Chris Ryall -
Do the menus on this site http://gcus.net producethe same effect? (I think we may be sharing similar code, from son of suckerfish and using some scripts to fix IE6s inadequacies).

We've noticed the similar delays at school - but hadn't narrowed it down to specific browsers.
In reply to Chris Ryall

Re: trouble with my theme and ie6

by Greg Lyon -
Well, not a solution, but another datapoint at least. I visited your site gcus.net and noticed the slowness in both IE and Firefox on windows XP if it makes any difference...

I use the 'suckerfish' dropdowns for a custom theme on every page of my moodle site and don't experience the slowdown like you have.

Here's how I've implemented it (in case it makes a difference)...

In my header.html I have the following:
In the header section I've added a link to my separate javascript page which gets added via a php page:

<? php include("snapjs.php"); //theme specific javascript ? >


To the start of the body:

<body<? php
echo " $bodytags";
echo " Xonload=\"startList()"; //This is the only line I added.
if ($focus) {
echo " ;setfocus()\"";
} else {
echo "\"";
}

? >>

Then I created a 'snapjs.php' page with the following one line:

<script Xlanguage="JavaScript" type="text/javascript" src="<? php echo $CFG->httpswwwroot.'/theme/'.current_theme() ? >/snap.js"></script>

And finally the snap.js page:

/**************************** menus (wake up IE!) ***********/

startList = function() {

 if (document.all&&document.getElementById) {
 navRoot = document.getElementById("nav");
 for (i=0; i<navRoot.childNodes.length; i++) {
 node = navRoot.childNodes[i];
 if (node.nodeName=="LI") {
 node.onmouseover=function() {
 this.className+=" over";
 }
 node.onmouseout=function() {
 this.className=this.className.replace(" over", "");
 }
 }
 }
 }
}

(Note that I put spaces in the php tags). For others who may find themselves here, the 'suckerfish' menu we're referring to is HERE: http://alistapart.com/articles/dropdowns/ including all the css and other parts to get it to work...

In reply to Greg Lyon

Re: trouble with my theme and ie6

by mandy honeyman -
Thanks for getting involved.

Yes and Chris you gave it to me cool!

Yesterday with a bit of time to breathe I edited out the following from header.html:

<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<script src="/IE7_0_9/ie7-standard-p.js" type="text/javascript">
</script>
<![endif]-->
<script type="text/javascript">
<!-- Hide this script from old browsers --
var random = Math.random() ;
var picnum = Math.round(random*4)+1;
// -- End Hiding Here -->
</script>

Notice I also had another little javascript lurking, but I wasn't using it anymore, I just hadn't ever cleaned up after myself.

What I didn't do was isolate the ie7 js to see if it was that!

What I do know is that the horrendous pregnant pause before the user regains control over the window is now gone. I am seriously considering a major re-design before ie7 takes serious hold - to avoid having to re-introduce that script, also because the drop-downs were not working with ie7 (they wouldn't disappear after hover).

Thanks again for your help.

BTW have you noticed how fast moodle.org suddenly is on v1.7 - I hope this bodes well for us all.

cheers
Mandy
In reply to mandy honeyman

Re: trouble with my theme and ie6

by Chris Ryall -
Finally found time to improve the responsiveness of the dropdown menus, and avoid using javascript.

Again, it isn't a perfect solution as it has now introduced a flicker to the menus when using IE 6 - but works fine for IE7 & Firefox. I used some pure css menus from www.cssplay.co.uk - the flicker only appears when I use the code within Moodle.

But it is faster, and degrades better than the previous menus. You're welcome to see how I've modified the code to include in the headers.