View Full Version : Problems with Switch Content Script and IE 7

03-17-2008, 02:14 PM
1) Script Title:
Switch Content Script

2) Script URL (on DD):

3) Problem:

I am using the Switch Content Script on following site:
It is a German site of a university chair, at which I am a Research Assistant. I use the script to manage a large amount of information (i.e. the course description) on a single page. This works perfectly well in Firefox, but looks terribly in the Internet Explorer 7: There seem to be a lot of pictures, which can't be found by the browser or something the like.

I am afraid there could be some trouble/interference with the wordpress CMS on which the site is built...

Your help would really be appreciated, as I put a lot of work in the proper design of this and realized just afterwards, that the IE would make such trouble (which is definitely not a good webdesign approach, but I am more like a hobby web designer...).

Thanks in advance,

PS: Please excuse my horrible english, as I am (as mentioned above) from Germany...

03-17-2008, 11:32 PM
There's quite a few potential issues here, but to start out, you currently have this line:

<p><script src="wp-includes/js/expandfunction.js" type="text/javascript"> </script></p>

repeated multiple times on the page, which is both unnecessary and potentially problematic. Go into Wordpress and find out where this code is being generated and replicated, and remove it entirely. Then, at the very bottom of your page, define what was in that script once on your page:

<script type="text/javascript">
var bobexample=new switchcontent("switchgroup1", "div") //Limit scanning of switch contents to just "div" elements
bobexample.setStatus('<img src="open.png" /> ', '<img src="close.png" /> ')
bobexample.setColor('darkred', 'black')
bobexample.collapsePrevious(true) //Only one content open at any given time

Make sure open.png and close.png exist on your server (ie: http://www.sowi.uni-mannheim.de/lehrstuehle/lspolzg/wordpress/open.png).

03-19-2008, 05:19 PM
Thanks a lot for your fast and thorough response!

The *.png line in the .js-Script is not absolute necessary for the script to work proper, isn't it? As for design reasons, I would prefer not to use it...

03-19-2008, 08:16 PM
Yes, it's not necessary, so you can if you like remove this line from your initialization code:

bobexample.setStatus('<img src="open.png" /> ', '<img src="close.png" /> ')