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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-12-2009, 03:40 AM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Simple Java Code Problem

This Java Code have this error:

Code:
else {document.write('<img src='XXXXXXXXXXXXXXXXXXXX/+seleccionado+' width='+width+' height='+height+'>');

It suppose to be:

Code:
else {document.write('<img src='XXXXXXXXXXXXXXXXXXXX/'+seleccionado+' width='+width+' height='+height+'>');
But I dont know where to make the change on the code:

Code:
 
<script type="text/javascript">; 
<!-- 
width="900"; //Anchura del banner 
height="140"; //Altura del banner 
 
banners= new Array(); 
banners[0]="XXXXXXXXXX/images/misc/cabe0.jpg"; 
banners[1]="XXXXXXXXXX/images/misc/cabe1.jpg"; 
banners[2]="XXXXXXXXXX/images/misc/cabe2.jpg"; 
banners[3]="XXXXXXXXXX/images/misc/cabe3.jpg"; 
banners[4]="XXXXXXXXXX/images/misc/cabe4.jpg"; 
banners[5]="XXXXXXXXXX/images/misc/cabe5.jpg"; 
banners[6]="XXXXXXXXXX/images/misc/cabe6.jpg"; 
banners[7]="XXXXXXXXXX/images/misc/cabe7.jpg"; 
banners[8]="XXXXXXXXXX/images/misc/cabe8.jpg"; 
banners[9]="XXXXXXXXXX/images/misc/cabe9.jpg"; 
banners[10]="XXXXXXXXXX/images/misc/cabe10.jpg"; 
banners[11]="XXXXXXXXXX/images/misc/cabe11.jpg"; 
banners[12]="XXXXXXXXXX/images/misc/cabe12.jpg"; 
banners[13]="XXXXXXXXXX/images/misc/cabe13.jpg"; 
banners[15]="XXXXXXXXXX/images/misc/cabe14.jpg"; 
banners[14]="XXXXXXXXXX/images/misc/cabe16.jpg"; 
banners[16]="XXXXXXXXXX/images/misc/cabe17.jpg"; 
banners[17]="XXXXXXXXXX/images/misc/cabe18.jpg"; 
banners[18]="XXXXXXXXXX/images/misc/cabe19.jpg"; 
banners[19]="XXXXXXXXXX/images/misc/cabe20.jpg"; 
banners[20]="XXXXXXXXXX/images/misc/cabe21.jpg"; 
banners[21]="XXXXXXXXXX/images/misc/cabe22.jpg"; 
banners[22]="XXXXXXXXXX/images/misc/cabe23.jpg"; 
banners[23]="XXXXXXXXXX/images/misc/cabe24.jpg"; 
banners[24]="XXXXXXXXXX/images/misc/cabe25.jpg"; 
banners[25]="XXXXXXXXXX/images/misc/cabe26.jpg"; 
banners[26]="XXXXXXXXXX/images/misc/cabe27.jpg"; 
banners[27]="XXXXXXXXXX/images/misc/cabe28.jpg"; 
banners[28]="XXXXXXXXXX/images/misc/cabe29.jpg"; 
banners[29]="XXXXXXXXXX/images/misc/cabe30.jpg"; 
banners[30]="XXXXXXXXXX/images/misc/cabe31.jpg"; 
banners[31]="XXXXXXXXXX/images/misc/cabe32.jpg"; 
banners[32]="XXXXXXXXXX/images/misc/cabe33.jpg"; 
banners[33]="XXXXXXXXXX/images/misc/cabe34.jpg"; 
banners[34]="XXXXXXXXXX/images/misc/cabe35.jpg"; 
banners[35]="XXXXXXXXXX/images/misc/cabe36.jpg";
banners[36]="XXXXXXXXXX/images/misc/cabe37.jpg"; 
banners[37]="XXXXXXXXXX/images/misc/cabe38.jpg"; 
banners[38]="XXXXXXXXXX/images/misc/cabe39.jpg";
banners[39]="XXXXXXXXXX/images/misc/cabe40.jpg";
banners[40]="XXXXXXXXXX/images/misc/cabe41.jpg";
banners[41]="XXXXXXXXXX/images/misc/cabe42.jpg";
banners[42]="XXXXXXXXXX/images/misc/cabe43.jpg";
 
 
totalbanners = banners.length; 
var ahora = new Date() 
var segundos = ahora.getSeconds() 
var ad = segundos % totalbanners; 
seleccionado=banners[ad]; 
localizador=seleccionado.lastIndexOf('.'); 
localizador2=localizador+4 
extension=seleccionado.substring(localizador+1,localizador2);  
archivo=seleccionado.substring(0,localizador); 
 
document.write("<center>"); 
if (extension=="swf"){ 
flash=seleccionado; 
document.write('<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=' + width + ' height=' + height + ' CODEBASE=\"xxxxxxxxxxxxxxx/flash4/cabs/swflash.cab#version=4,0,0,0\">'); 
document.write('<PARAM NAME=\"MOVIE\" VALUE=\"' + flash + '\">'); 
document.write('<PARAM NAME=\"PLAY\" VALUE=\"true\">'); 
document.write('<PARAM NAME=\"LOOP\" VALUE=\"true\">'); 
document.write('<PARAM NAME=\"QUALITY\" VALUE=\"high\">'); 
document.write('<EMBED SRC=' + flash + ' width=' + width + ' height=' + height + ' PLAY=\"true\" LOOP=\"true\" QUALITY=\"high\" PLUGINSPAGE=\"xxxxxxxxxxxxxxxxxxx/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash\">'); 
document.write('</EMBED>'); 
document.write('</OBJECT>');} 
else {document.write('<img src='+seleccionado+' width='+width+' height='+height+'>'); 
document.write('</center>');} 
// -->; 
</script>
I hope you can helpme!


Thanks
Reply With Quote
 


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 08:58 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.07511 seconds
  • Memory Usage 2,337KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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