Support Forums
[javascript] Link of Minute - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36)
+---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43)
+---- Thread: [javascript] Link of Minute (/showthread.php?tid=2631)



[javascript] Link of Minute - zone - 11-06-2009

Credits and Source: http://jsmadeeasy.com/

Name: Link Of Minute
Description: JavaScript will create a link that will change depending on the minute of the hour! You can add as many entries as you want!
Snippet:

Insert into <BODY>
Code:
<SCRIPT LANGUAGE="JavaScript">

<!-- Original:  Joe Merical  -->



<!-- Begin
var links = 12; // set this to the number of links you have below!
var dateCur = new Date();
var rd = dateCur.getMinutes();
var ra = rd % links;
var re = ++ra;
var url = "document.write(re)";
var text = "";
if (re == 1) {
url = "http://javascriptsource.com";
text = "The JavaScript Source";
}
if (re == 2) {
url = "http://www.htmlgoodies.com/";
text = "HTMLgoodies";
}
if (re == 3) {
url = "http://www.ask.com/";
text = "Ask.com Search Engine";
}
if (re == 4) {
url = "http://www.microsoft.com/";
text = "Microsoft, Inc.";
}
if (re == 5) {
url = "http://www.netscape.com/";
text = "Netscape's web site";
}
if (re == 6) {
url = "http://www.hotbot.com";
text = "HotBot's Search Engine";
}
if (re == 7) {
url = "http://www.internet.com";
text = "Internet.com";
}
if (re == 8) {
url = "http://www.altavista.digital.com";
text = "Digital Altavista - A Search Engine";
}
if (re == 9) {
url = "http://www.webdiner.com/";
text = "Web Diner - Help on the Web";
}
if (re == 10) {
url = "http://www.smartclicks.com/";
text = "SmartClicks - Free advertising on the Web";
}
if (re == 11) {
url = "http://www.trailerpark.com/flamingo/chowch/aj/";
text = "Awards Jungle - One Stop Awards Submission";
}
if (re == 12) {
url = "http://www.geocities.com/";
text = "Geocities - Get a FREE web site";
}
var link="<A TARGET=\"_top\" HREF=\""+url+"\" onMouseOver=\"window.status='"+text+"'\">"+text+"</A>";
document.write(link);
// End -->
</SCRIPT>

That's it
Thankyou for reading. Be happy always Smile


RE: [javascript] Link of Minute - jolttz - 11-08-2009

Thanks, I was going to write something like that.


RE: [javascript] Link of Minute - zone - 11-08-2009

No problem


RE: [javascript] Link of Minute - Sagittarius - 12-11-2009

i like that code many many thank poster...