Results 1 to 4 of 4

Thread: Problems with Switch Content Script and IE 7

  1. #1
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problems with Switch Content Script and IE 7

    1) Script Title:
    Switch Content Script

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Problem:

    I am using the Switch Content Script on following site:
    http://www.sowi.uni-mannheim.de/lehrstuehle/lspolzg/wordpress/?page_id=5

    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 2.0.0.12, 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,
    Felix

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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    There's quite a few potential issues here, but to start out, you currently have this line:
    Code:
    <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:
    Code:
    <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.setPersist(true)
    bobexample.collapsePrevious(true) //Only one content open at any given time
    bobexample.init()
    </script>
    Make sure open.png and close.png exist on your server (ie: http://www.sowi.uni-mannheim.de/lehr...press/open.png).

  3. #3
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Yes, it's not necessary, so you can if you like remove this line from your initialization code:

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •