vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Javascript does not want to run (https://vborg.vbsupport.ru/showthread.php?t=250453)

Twilkey 09-14-2010 12:50 AM

Javascript does not want to run
 
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
HTML Code:

    <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.
HTML Code:

    <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 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.


All times are GMT. The time now is 03:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01655 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete