Pages: 1

  2008-06-27 00:13:52

shakiro214
» FTalkGeek
FTalk Level: zero
1188
0
1969-12-31

As requested by [b]Sprongky[/b] :cool: :thumbsup: Want a to have different JS files load everytime someone views your profile? :redface: Well, now you [i]CAN~!![/i] :drool: Here's the code: [quote

As requested by [b]Sprongky[/b] :cool: :thumbsup: Want a to have different JS files load everytime someone views your profile? :redface: Well, now you [i]CAN~!![/i] :drool: Here's the code: [quote]//This is a shakiro214 production //In cooperation with friendsterTalk forum lagann = new Array(); lagann[0]="[b]JS_URL_1[/b]"; lagann[1]="[b]JS_URL_2[/b]"; toppa=Math.floor(Math.random() * lagann.length); var JS = document.createElement("script"); JS.type = "text/javascripe"; JS.src=lagann[toppa]; document.getElementsByTagName("head")[0].appendChild(JS);[/quote] To add more js files, simply add more arrays, like so [quote]lagann[2]="[b]JS_URL_3[/b]"; lagann[3]="[b]JS_URL_4[/b]"; lagann[4]="[b]JS_URL_5[/b]";[/quote] and so on... If you want to have random JS files in IE & FF as separate, here's a full example of what a combined code would look like: <">[b]That's it. You're done![/b] :cool: :thumbsup: [b]no preview available[/b] :| I currently use 1 js file for my profiles. Besides you would usually know what's already going to happen if you have more than 1 JS file and set it to random :wasted:

Pages: 1

Board footer

© 2024 F Talk

Current time is 21:30

[ 13 queries - 0.016 second ]
Privacy Policy