Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
Javascript >> General
how to rotate the links using javascript?
Visitor Ratings (1) :
Description
Code
Select All
<SCRIPT LANGUAGE="JavaScript"> <!-- function makeArray(q){ for(i=1 ; i < q ; i++){this[i]=0}} w=1; howmanysites=4; // Number of sites listed Below Sites = new makeArray(howmanysites); Sites[1] = "http://www.abhishektripathi.com|Abhishek's Blog!"; //put yoursites then | and what you want the box to show here's where I got the orig. Sites[2] = "http://forums.digitalpoint,cin|The Best Forum!"; Sites[3] = "http://www.secmate.com|Get PayPal Verified!"; Sites[4] = "http://www.twinkhost.net|Free Hosting No Ads!"; function showSites() { if (w > howmanysites) { w=1; }; var string=Sites[w] + ""; var split=string.indexOf("|"); var url=string.substring(0,split); var word=string.substring(split + 1,string.length); document.form.url.value=url; document.form.word.value=word; w+=1; window.setTimeout('showSites()',1500); } function visitSite() { window.location=document.form.url.value; } // End --> </SCRIPT> </head> <BODY> <center> <form name=form> <table><tr><td align=center> <input type=hidden name=url value=""> <input type=text name=word value="" onFocus="visitSite()" size=40> </td></tr></table> </form> </center> <script> showSites(); </script> <P>
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10