SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2007
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conflicting events problem

    Hi, I'm having a problem with the JS on my site. It contains AJAX loaded content, an AJAX enquiry form - both of which worked fine together until i tried to add Mootools and Slimbox. Now, the Javascript on my enquiry form doesn't fire up and neither does Slimbox - although when i remove either of these scripts then the other one works ok. I can't see what I'm doing wrong, I'm using mootools to add the events on 'domready'. Firebug reports no errors so I'm at a loss here as to what's gone wrong!

    If anyone can help that would be great.

    site is at EDITED
    (the image on the homepage is for slimbox demo purposes..)
    Last edited by nicky77; Jul 11, 2008 at 05:54.

  2. #2
    SitePoint Addict
    Join Date
    Jun 2006
    Location
    Durban, South Africa
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Iv had a similar problem before. In my case the external code that I was using and my own code, were both creating, say an on_load event, and thus one was canceling the other one out.
    Id suggest checking for those kinds of things.
    Hope this helps

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2007
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey poizn, thanks for the reply. i've had this type of problem before too, but on this occasion i really don't understand why i'm having this problem! the mootools addEvent function should allow me to add any number of events, either onload or domready. I've also tried keeping things separate by using my own addEvent function for my ajax form, while using mootools addEvent for the slimbox functionality, but this didn't work either...

  4. #4
    SitePoint Addict
    Join Date
    Jun 2006
    Location
    Durban, South Africa
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah unfortunately that was my best guess without having the code in front of me. And im guessing there is probably a lot of code, so no real chance of posting it all up, is there?

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2007
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    decided to switch from mootools to scriptaculous and this problem disappeared. i'm sure i've had this problem before with mootools....anyway, thanks for your help poizn!

  6. #6
    SitePoint Addict
    Join Date
    Jun 2006
    Location
    Durban, South Africa
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No worries


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
  •