Pages: 12

  2008-02-10 11:50:37

dracoknight09
» FTalkAddict
FTalk Level: zero
302
0
1969-12-31

[b]Original Code:[/b] Javascript.internet.com [b] Credits:[/b] Me.. :eh: :thumbsup: [b]Acknowledgments:[/b] Team DiabolicDuchShiKnights2008 :thunder: ok this code simply redirects you in a rand

[b]Original Code:[/b] Javascript.internet.com [b] Credits:[/b] Me.. :eh: :thumbsup: [b]Acknowledgments:[/b] Team DiabolicDuchShiKnights2008 :thunder: ok this code simply redirects you in a random page every time you click it. without any sequence. this is good for making resource or reference buttons.. or member's linkages.. it's up to you.. :paranoid: :arrow: [b]ok.. as usual... this goes outside the loader.. [/b](i always use this format) [quote]//Random Button var Lucky = new Array(); var FeelLuckyCookieName = "FeelLuckyCookie"; var NewWindow = "y"; Lucky[0] = "[b]URL[/b]"; Lucky[1] = "[b]URL[/b]"; Lucky[2] = "[b]URL[/b]"; Lucky[3] = "[b]URL[/b]"; var TabChar = String.fromCharCode(9); var CurrentCookie = ''; function GetLuckyCookie() { var cookiecontent = ''; if(document.cookie.length > 0) { var cookiename = FeelLuckyCookieName + '='; var cookiebegin = document.cookie.indexOf(cookiename); var cookieend = 0; if(cookiebegin > -1) { cookiebegin += cookiename.length; cookieend = document.cookie.indexOf(";",cookiebegin); if(cookieend < cookiebegin) { cookieend = document.cookie.length; } cookiecontent = document.cookie.substring(cookiebegin,cookieend); } } return cookiecontent; } function PutLuckyCookie(value) { if(CurrentCookie.length > 0) { value = CurrentCookie + TabChar + value; } value = escape(value); document.cookie = FeelLuckyCookieName + "=" + value; } function YesMakeMeLucky() { CurrentCookie = GetLuckyCookie(); CurrentCookie = unescape(CurrentCookie); if(CurrentCookie == '.') { CurrentCookie = ''; } var LuckyVisitedList = CurrentCookie.split(TabChar); if(LuckyVisitedList.length >= Lucky.length) { document.cookie = FeelLuckyCookieName + "=."; CurrentCookie = ''; LuckyVisitedList = Array(); } for(var i = 0; i < LuckyVisitedList.length; i++) { Lucky[LuckyVisitedList[i]] = ''; } var LuckyL = new Array(); for(var i = 0; i < Lucky.length; i++) { if(Lucky[i].length > 0) { LuckyL.push('' + i + TabChar + Lucky[i]); } } var LuckyDestinationNumber = 0; if(LuckyL.length > 1) { LuckyDestinationNumber = Math.ceil((Math.random() * LuckyL.length) - 1); } var LuckyNumberPlace = new Array(); LuckyNumberPlace = LuckyL[LuckyDestinationNumber].split(TabChar); PutLuckyCookie(LuckyNumberPlace[0]); NewWindow = NewWindow.toLowerCase(); if(NewWindow.substr(0,1) == "y") { window.open(LuckyNumberPlace[1]); } else { document.location = LuckyNumberPlace[1]; } }[/quote] you can repeat this line to add more links: [quote]Lucky[4] = "[b]URL[/b]";[/quote] just change the number.. :eh: :arrow: then use this HTML code to be inserted anywhere in a replacement/addbox code.. :D :thumbsup: [quote]<input type=\"button\" onclick=\"YesMakeMeLucky()\" value=\"Feeling Lucky?\">[/quote] [b] Example:[/b] (in how your connected box) [quote]var draco = document.getElementById("15").getElementsByTagName("h2")[0]; draco.innerHTML="<center><br>[b]Title Here[/b]<br><br><form>"+ "<input type=\"button\" onclick=\"YesMakeMeLucky()\" value=\"Feeling Lucky?\"><br>"+ "</form><br></center>";[/quote] paste inside the loader and that's it! just change the bold texts with your own values.. and wallah! your done! :cool: :thumbsup: [b] PREVIEW: [/b] [url]http://profiles.friendster.com/56419498[/url] [b]"Time is Mana" [/b] :clock:

Pages: 12

Board footer

© 2024 F Talk

Current time is 01:58

[ 12 queries - 0.023 second ]
Privacy Policy