General Community > Off-Topic
Problems interacting with javascript
Availor:
I've noticed this some time ago, but I thought that it was a problem with the specific moduel. Now I know that there's a problem - WebsiteBaker cannot accept other javascript. If I put javascript into a template and install a module that uses javascript, the template's javascript will not work. I've tested it with several scripts. I have one demo.
http://www.websitebakerden.com/pages/menu/imageflow.php You can see that when I installed Ruude's module the original javascript (the glider at the bottom) does not work. It will be the same with smooth gallery module or every module that uses javascript. Does anyone else familiar with that?
Availor:
To be more precise (made some more tests) WB modules don't work with jquery tools.... I wonder why is that :?
Ruud:
Hi Availor,
For me, the imageflow script (fully javascript) including the scrollbar works fine.
Tested with FF2, FF3, IE7 and IE8.
I get one error:
--- Code: ---Error: $("#myController") is null
Source: http://www.websitebakerden.com/pages/menu/imageflow.php
Line: 17
--- End code ---
This is on some init from the jquery script. It doesn't give problems on the working of the gallery.
Also the lightbox script popups fine.
The problem with (changing) scripts is that browsers will cache them. Reloading with Shift-F5 and/or clearing the browser-cache is mostly needed.
Ruud
Availor:
Ruude, I didn't mean that the problem is with the module.
When I make a template I try to implement javascript functions like tabs, accordion menu and so on. It seems that two jquery modules canno coexist. This script (http://www.javascriptkit.com/script/script2/dropdownpanel.shtml) Is top pabel script I wanted to implement into my template. http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm This is a carousel script (You can find lots of goodies at www.ajaxdaddy.com - If you run them one by one everything is fine. If you add any WB module or two scripts only one will work. The problem is not with the module but with the script.
In this example (http://www.websitebakerden.com/pages/menu/imageflow.php) You can see that the glider below does not work (tested on ie7 and FF) because i added the imageflow gallery module. It would be the same if I added smooth gallery, cssdocks menu or anything else.
Bottom line is for some reason two modules cannot live together - only one will work. I wonder if there is a work around. Otherwise all the scripts cannot be implemented inside WB and that's a shame.
Ruud:
A quick google shows that jQuery.js and Prototype.js (and probably other libraries) don't like each other because they use the same techniques.
Here is a story with a possible fix for you.
http://www.dynamicdrive.com/forums/showthread.php?t=29668
In short, replace all occurrences of $ into $j in your jquery.flow.1.1.js.
Hope that helps.
Ruud
Navigation
[0] Message Index
[#] Next page
Go to full version