PDA

View Full Version : Javascript does not want to run


Twilkey
09-14-2010, 12:50 AM
I made a custom page for a friend and am trying to put an automated rotating banner image on the page. Now I have used many scripts out there and even made one up myself, but for some reason the javascript doesnt want to work on this page. It has beed a bit sense I tried using javascript in vbulletin, but I know I have, so do any of you have any idea why a custom page may not want to run javascript?

The last script I tried used this code in the header
<link rel="stylesheet" type="text/css" href="engine/css/slideshow.css" media="screen" />
<style type="text/css">.slideshow a#vlb{display:none}</style>
<script type="text/javascript" src="engine/js/mootools.js"></script>
<script type="text/javascript" src="engine/js/visualslideshow.js"></script>I even tried adding the direct link to the files and that didnt seem to work and I know they were the right links because I opened the links in a new browser window and got the code, so thats not the problem.

Also it may be good to note that this code is in a shell template, and then the code that has the div with all the images is in another template.

The images show up, but sense the javascript doesnt run they are all just stacked.
<div id="show" class="slideshow">
<div class="slideshow-images">
<a href="data/images/rr1.jpg"><img id="slide-0" src="data/images/rr1.jpg" alt="rr1" /></a>
<a href="data/images/rr10.jpg"><img id="slide-1" src="data/images/rr10.jpg" alt="rr10" /></a>
<a href="data/images/rr11.jpg"><img id="slide-2" src="data/images/rr11.jpg" alt="rr11" /></a>
<a href="data/images/rr12.jpg"><img id="slide-3" src="data/images/rr12.jpg" alt="rr12" /></a>
<a href="data/images/rr13.jpg"><img id="slide-4" src="data/images/rr13.jpg" alt="rr13" /></a>
<a href="data/images/rr2.jpg"><img id="slide-5" src="data/images/rr2.jpg" alt="rr2" /></a>
<a href="data/images/rr3.jpg"><img id="slide-6" src="data/images/rr3.jpg" alt="rr3" /></a>
<a href="data/images/rr4.jpg"><img id="slide-7" src="data/images/rr4.jpg" alt="rr4" /></a>
<a href="data/images/rr5.jpg"><img id="slide-8" src="data/images/rr5.jpg" alt="rr5" /></a>
<a href="data/images/rr6.jpg"><img id="slide-9" src="data/images/rr6.jpg" alt="rr6" /></a>
<a href="data/images/rr7.jpg"><img id="slide-10" src="data/images/rr7.jpg" alt="rr7" /></a>
<a href="data/images/rr8.jpg"><img id="slide-11" src="data/images/rr8.jpg" alt="rr8" /></a>
<a href="data/images/rr9.jpg"><img id="slide-12" src="data/images/rr9.jpg" alt="rr9" /></a>
</div>
</div>And go here (http://woogiewoo.com/new/shop.php)to see the page.

Thanks in advance.

compwhizii
09-15-2010, 01:54 AM
I don't see that bit linking the javascript being outputted anywhere. You could try using a template_hook in the script to add those files to the output.

Twilkey
09-15-2010, 02:12 AM
Thanks, what you said lead me to the fix. I feel like an idiot. I added that code to the master style, and forgot to revert the template in the default style.