Results 1 to 4 of 4

Thread: Possible script conflict, only affecting Internet Explorer

  1. #1
    Join Date
    May 2010
    Location
    Rosebud West, Australia
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Possible script conflict, only affecting Internet Explorer

    1) Script Title:
    Drill Down Menu (v1.6)
    &
    Dynamic Ajax Content

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

    3) Describe problem:
    When using the two of these scripts in conjunction (using the Drill Down Menu links to load Dynamic Ajax Content) the Dynamic Ajax Content breaks in Internet Explorer with the error: 'document.getElementById(...)' is null or not an object.

    However it works flawlessly in mozilla firefox, for an example view the following URL in both firefox and Internet Explorer:
    http://woodenboatshop.com.au/yanmar/...nflicttest.php

    I have had this problem for quite some time, and I have looked for conflicts between the two scripts but have come up with no solutions. I'm not a master with scripts so I'm out of ideas as to what it could be and would really appreciate any help I can get here.

    Thank You.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    document.getElementById() is known to be somewhat problematic in IE.

    You can google it for more info. A lot of results show up. One is that name and id elements get confused in IE7 and earlier. Another is that apparently the id cannot be a reserved/used system property.

    http://stubblog.wordpress.com/2007/0...entbyid-vs-ie/
    Anyway, to cut a long story short, and to stop you spending as much time reading this post as I did finding the problem, it turns out that IE cannot handle global variables with the same name as an DOM element ID, especially if that variable is actually pointing at that DOM node!!
    Does that help?

    Try changing the id to something else and maybe it will work. The two scripts in this case should not be a problem, but perhaps using them together creates a problem with an id named something unusual.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    djvk87 (11-29-2010)

  4. #3
    Join Date
    May 2010
    Location
    Rosebud West, Australia
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I'll have a go at that.
    I really hope I can get it to work as I spent a lot of time setting up a system using these two scripts on my businesses website.

    I noticed the problem while I was still working on it but figured I'd be able to solve it. I suppose in hindsight I should have either solved it then and there or changed to another script that didn't conflict in IE.

  5. #4
    Join Date
    May 2010
    Location
    Rosebud West, Australia
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Well that didn't work

    Well I tried to figure out how to change the name of the variable, or make the variable local to the function in the Dynamic Ajax Content script. But everything I tried just broke the script.

    I'm not the best with Javascript you see, which is why I used the scripts premade here. I can disable the Drill Down Menu and the Dynamic Content works fine, but it really needs the menu.

    Pretty much I'm stumped for ideas, I've looked for an alternate menu system that has the overall same effect but I can't find one. And even if I did change the menu system I'd need one that uses <li> and <ul> tags for the structure otherwise I'd have to rewrite a lot of code. That and I really like the Drill Down Effect.

    I want to use both these scripts in conjunction and I just wish IE wouldn't stuff everything up all the time.

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
  •