Your page is in violation of Dynamic Drive's
usage terms, which, among other things, state that the script credit must appear in the source code of the
page(s) using the script. Please reinstate the notice first.
It doesn't work even the first time in some browsers. The loadobjs method of the Ajax script is simply intended to make scripts and style available to the 'top' page. With style, just being available (as long as there are no other conflicting styles) activates it. With scripts though, often a command is required to activate/initialize. In any case, loadobjs only loads once anyway. Once the script or style is associated with the top page, it is already there. The loadobjs function keeps track of this and will not load it again.
The activation of a script against imported content cannot be done until after the browser has parsed the imported content.
There are various ways generally. If you are going to use mygalone as the id for all externally loaded galleries, we can:
First forget about loadobjs. Put all the scripts and styles it is loading directly on the top page as if the gallery were already there (loadobjs would only be putting them on there once anyway), except the one that initializes mygalone (slide.js).
Create a new script - say, call it prepgal.js:
Code:
function killGal(){
if(document.getElementById('mygalone'))
document.getElementById('mygalone').id='';
}
function pollGal(){
if(document.getElementById('mygalone'))
$("div#mygalone").slideView()
else
setTimeout('pollGal()', 300);
}
and link it to the top page:
HTML Code:
<script type="text/javascript" src="prepgal.js"></script>
or similar using the actual path and filename of this new script.
Now, where you had:
HTML Code:
<a href="javascript:ajaxpage('http://www.mlarino.com/web2/textpattern/ajaxfiles/external2.htm', 'rightcolumn'); loadobjs('http://www.mlarino.com/web2/textpattern/ajaxfiles/slide.css', 'http://www.mlarino.com/web2/textpattern/ajaxfiles/jquery-1.2.1.pack.js', 'http://www.mlarino.com/web2/textpattern/ajaxfiles/jquery.easing.1.3.js', 'http://www.mlarino.com/web2/textpattern/ajaxfiles/jquery.slideviewer.1.1.js', 'http://www.mlarino.com/web2/textpattern/ajaxfiles/slide.js')">test</a>
You can now use:
HTML Code:
<a href="javascript:killGal();ajaxpage('http://www.mlarino.com/web2/textpattern/ajaxfiles/external2.htm', 'rightcolumn');pollGal();">test</a>
Bookmarks