Results 1 to 3 of 3

Thread: Problems with javascript interfering with other javascript

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Problems with javascript interfering with other javascript

    I have this home page with drop down menu at the top and I recently incorporated a slideshow and a scroll image gallery underneath.

    The gallery and the slideshow work fine but the dropdown menu stop working (it doesn't show the submenus)

    I found out that there is a javascript that some how ended up in the file and is interacting with all of the other javascripts. The slideshow is using 2 js which are: <script type="text/javascript" src="http://www.southsunbeads.com/website/slideshow/jquery-1.2.6.pack.js"></script>
    <script type="text/javascript" src="http://www.southsunbeads.com/website/slideshow/simplegallery.js">

    This one is used by the scroll image gallery: <script type="text/javascript" src="http://www.southsunbeads.com/website/carousel/stepcarousel.js">

    There is a 3rd script that I don't remember calling, but it seems that is putting everything together and is the one that is affecting the menu of the home page: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    Here is the url of the page: http://www.southsunbeads.com

    Can someone help with this?

    Thank you

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This may be difficult to deal with because it looks like you are using one or more server side includes to set this page up. However, the order of the scripts and styles needs to be changed, and extra markup that doesn't belong needs to be removed. The includes will need to be changed to achieve that. You may have to split one or more (I really cannot tell how many includes there are) includes into two or more to get the code to end up in the correct places. You may perhaps even need to rethink how and what you are including when and where.

    You also need to ditch:

    Code:
    <script type="text/javascript" src="http://www.southsunbeads.com/website/slideshow/jquery-1.2.6.pack.js"></script>
    and modify the simplegallery.js file. I will attach a demo .zip file. In it will be a workable page, with the scripts and styles ordered as they need to be, the one script that needs to be ditched removed. It also contains the modified version of the simplegallery.js file:

    Attachment 3470
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problems with javascript interfering with other javascript

    Thanks a lot for your help. I'm using Magento as a CMS which I'm still not very familiar with, so I'm not sure of the includes we are using since this site was all designed by someone else.

    I'll try to make the changes you've suggested. I'll hope it works.

    Thank you

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
  •