View Full Version : i am trying to use two different scripts but they are not working simultaneously

09-24-2006, 07:21 PM
1) Script Title:
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
2)Script URL:

1) Script Title (2):
* Cool DHTML tooltip script II- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
2)Script URL:
3) Describe problem:

i m trying to use both scripts togather on my web site, but if i use both then only the first one, menu is working and no tool tips are appearing, and if i remove only the javascrpt code from the head for swtch menu, then tool tips start appearing
pl help me, i have invested alot of time
thank you in advance

09-25-2006, 04:20 AM
I have the same problem . I use two scripts in my website but only one of them is working.

09-25-2006, 07:21 AM
Here is what I often recommend folks look into:

See this tutorial (http://www.javascriptkit.com/javatutors/multiplejava.shtml) for one possible solution.

Aside from the tutorial above, which usually is the solution when the problem is two different scripts, you may need to consult:


Which explains how two scripts on the same page may not use the same set of variable names, id names, function names, etc. This is especially important if the problem is two copies of the same script on a page but, can come into play with two different scripts when the first step (tutorial) won't fix it.

One other approach that works in both situations, if adaptable to one (or more) of the scripts, is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.