Web Analytics Made Easy -
StatCounter scripts conflict - not onload issue - CodingForum


No announcement yet.

scripts conflict - not onload issue

  • Filter
  • Time
  • Show
Clear All
new posts

  • scripts conflict - not onload issue

    Okay, I will admit right up front, I'm generally a cut and paster. I can make some changes and can understand scripts in theory, but beyond that, I am a complete and utter novice.

    I am trying to get two scripts to work together for a website for my father-in-law and while the two work independently, they do not work together on the same site.

    I feel like I have searched diligently for an answer to this issue (here and elsewhere) and have found no solution. I hope someone here can help me!

    The two scripts come from DD's website (which I love, by the way).
    Top Navigational Bar III

    DHTML Tip Message

    When I put the two together (following instructions for placement by each script), they work in netscape 7.x and Opera 7.x, but not in IE 6.x! In IE, only the menu works, but not the tooltips.

    Here is where you can see this issue at work:

    Thank you so much!

  • #2
    you checked this?


    • #3
      Thank you for the link. I had not, in fact, seen that help document. I must have missed it on Brothercake's website.

      Unfortunately, being as I'm a complete novice, I'm not sure that this is going to help. The second script (Tip Message) does not use an onload command (there is no onload command in my body tag or elsewhere that runs the second script) unless it is hidden in one of the .js files and I could not find it.

      So I'm still searching for assistance. If I am missing something with regards to the onload command, I welcome direction from anyone!



      • #4
        Hi Mystang;

        There is just too many external scripts!
        If you can place all of the scripts into a text file and attach that to your post. I will take a look and try to figure out what the conflict is.



        • #5
          Here's the .js files for the top menu 3, not including the "menu_browser" files which are really long.

          If you need those, I can put them all in a zip file, but they are so long that I didn't think it would be readable if I put them all into one txt file.

          I'll put the Tip Message .js files into the next message.
          Attached Files


          • #6
            Here are the .js files for the DHTML Tip Message script.
            Attached Files


            • #7
              Hi ;

              Taking a quick look. It appears that there is a conflict with both scripts using the same global variables for their browser detection.

              var ie=false;
              var ie4=false;
              var ie5=false;
              var ie6=false;
              var com=false;
              var dcm;
              var op5=false;
              var op6=false;
              var op7=false;
              var ns4=false;
              var ns6=false;
              var ns7=false;
              var mz7=false;
              var kde=false;
              var saf=false;


              • #8

                Thanks for looking at all that junk!

                Now that there's a possible conflict there, how do I fix it?



                • #9
                  Willy or anyone,

                  Even with those conflicts, any idea why everything works in Netscape and Opera but NOT in IE? Isn't that kind of strange?

                  Thanks again,


                  • #10

                    Willy, thanks so much for your assistance.

                    As it turns out, I upgraded to the newest version of the tip message script, then literally messed with it until I got things to work.

                    I'm pretty sure the new external script uses different var statements (as you had indicated needed to be done) and then I messed around until I got the tips working on IE. I fixed the DIV tag to match the new version, added in a missing line to the external script (by instruction in the new readme file) got rid of a CSS function and finally all the errors went away and everything works.

                    Thanks again, Willy, for taking the time to look at it. You pointed me in the right direction and after some poking and prodding, things are working.



                    • #11
                      I'm glad you found a solution!