Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2010, 12:50 AM
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-15-2010, 01:54 AM
compwhizii compwhizii is offline
 
Join Date: Aug 2009
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-15-2010, 02:12 AM
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:25 PM.


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.04087 seconds
  • Memory Usage 2,187KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete