rhandalthor
asked on
Load several javascripts from one library or directory using php / html?
I would like to load several javascripts from one external library or directory. How can I do this with PHP and html in the header of a site? There are several scripts in the same directory I need to be loaded for certain javascript apps to work..
ASKER
How are scripts loaded here http://tiny.cc/OWIWy ? I don't see a call for every script from Google Apis.com...
There are several scripts included on that page. prototype and scriptaculous is loaded at the start:
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></s cript>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js" type="text/javascript"></s cript>
Several others are included in a similar way, and a tracker script is loaded indirectly using document.write(). Which script are you missing?
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></s
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js" type="text/javascript"></s
Several others are included in a similar way, and a tracker script is loaded indirectly using document.write(). Which script are you missing?
ASKER
slider.js I guess as I want a similar slideshow on my website....
How do load others indirectly using document.write() ?
How do load others indirectly using document.write() ?
The slideshow seems to be defined here:
http://www.leemunroe.com/wp-content/themes/leemunroe/scripts.js
>> How do load others indirectly using document.write() ?
The google analytics tracker is loaded like this:
document.write(unescape("% 3Cscript src='" + gaJsHost + "google-analytics.com/ga.j s' type='text/javascript'%3E% 3C/script% 3E"));
http://www.leemunroe.com/wp-content/themes/leemunroe/scripts.js
>> How do load others indirectly using document.write() ?
The google analytics tracker is loaded like this:
document.write(unescape("%
ASKER
I see CXR. Well then the question remains why my slides don't show at http://lab.imagewize.net/doede/ . I load all script necessary I think, but I don't see slides being loaded. Please have a look and help me on my way. I am not very familiar with Javascript. Maybe I need to add st to the html or css to load it all?
ASKER
Think I found it.... Hold on
ASKER
Well one is visible. But there is not sliding yet... Any ideas why?
ASKER
Well added one more script and now it works. I only still get an empty background. That should not happen..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Added the missing slider.js from ajax.googleapis.... Working now. Also placed prototype above scriptaculous. All working now! :-) Thanks!
ASKER
slideshow.js is a a different script from slider.js. Named the former like that. I belive it is needed to run the slideshow besides effects.js and slider.js, scriptaculous and protoype..
ASKER
Well I experimented with some java scripts as I want the gallery to work with multibox. Multibox and NextGen Gallery did not work so I tried lightbox. No success. Went back to old settings. Now jquery is loaded. I don't no why. And I think it slows down the slideshow on the front page as it starts later.
ASKER
Well my favorite galery plugin NextGen gallery loads thickbox and jquery. When I turn of effects both scripts are droppped. But still the slider on the front page starts empty. How can I fix that?
ASKER
Well I fixed the empty space at startup. Now I need multibox to work on the portfollio page. It does not... yet.
I have answered your original question and several follow-up questions allready. Please ask a new question.
ASKER
Sure. Will do that.
<script type="text/javascript" src="onefile.js"></script>
<script type="text/javascript" src="anotherfile.js"></scr
<script type="text/javascript" src="thirdfile.js"></scrip