Conflicting Javascripts on Page Help

Discussion in 'JavaScript' started by shakyfry, Apr 16, 2008.

  1. #1
    I have multiple javascripts on my page and I have been using them for quite sometime without any problems.

    I attempted to add a new javascript for a new navigation menu and both scripts now do not work together when they co-inside in the same head. I researched and the best I could come up with is renaming variables or functions or using the OnLoad function. I have tried this to the best of my knowlegde without any success.

    I am not very familiar with javascript but I have narrowed it down to these two scripts. When I remove prototype.js and keep global.js in the head, the top menu works as it should but the modalbox drop down does not, and prototype.js is needed for modalbox dropdowns to work.

    If I remove global.js and keep prototype.js in the head, the menu does not work as it should but the modalbox drop downs do work. If I have both scripts (global.js and prototype.js) in the head only the modalbox drop down works. (prototype.js)

    I have tried renaming variables, onload, ect with no luck, so here I am.

    The entire site is template based, and it uses smarty libs just to let you know.

    Here is the link to the files in a zip file. Please help.

    http://www.moviedash.com/fix.zip
     
    shakyfry, Apr 16, 2008 IP