Web Analytics Made Easy -
StatCounter dual script conflict. - CodingForum


No announcement yet.

dual script conflict.

  • Filter
  • Time
  • Show
Clear All
new posts

  • dual script conflict.

    Let me begin by apologizing I'm sorry if this is confusing or complicated (it is at least to me), or if I've overlooked anything or not provided the correct or enough information. I'll do my best to be as clear as I can. I did try to make it easier by making a few very basic web pages to show my problem and hopefully assist in get me a little help.

    Ok, first off, the two scripts I'm using are in external js files. I'm currently using a script that puts a nifty floating window, centered, at the bottom of a web page. Simple example is at;


    Recently I got the "bright" idea to implement a floating navigational menu at the top of the page. ULTIMATE DROPDOWN MENU VERSION 3.4.1b . Simple example is at;


    The problem is if I try to combine the two on the same page, things go "wiggy". I've tried 2 different methods by changing the placement of the script on the page, but neither solves the problem. Simple examples are at;


    Any ideas how to make both scripts work together? Can I provide any additional info? Any help is greatly appreciated!

  • #2
    You probably have multiple onload statements.

    See:- http://www.javascriptkit.com/javatut...iplejava.shtml

    Another possibility is that there is duplication of function or variable names between the two scripts.
    Last edited by Philip M; Oct 7, 2006, 06:33 AM. Reason: Typo

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


    • #3
      *sigh*. I read through your link (thank you). Only the script for the floating window has a "window.onload" in the script, and neither use a "body onload" tag.

      I moved on to;
      http://www.javascriptkit.com/javatut...taction4.shtml "for some additional information on resolving script conflicts."

      The nav menu consists of FOUR js files. "function" (which I now understand can conflict with "window.onload") appears 7 times in one file (sniffer.js) and 3 times in another file (meny.js)

      This is approaching the "way over my head" category........ Any other advise? Any need for a short, paying gig?