![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2003
Posts: 3,191
|
javascript guru, what's problem here?
hi, i'm trying to rework a script written to show a different URL each day---it was originally written for 366 days, but i've shortened it to 13 days as a test---but does not show anything on the page.
i know nothing of javascript---can anyone tell me what's wrong? thanks! hahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahaha <HTML> <head> <title>Link Day</title> </head> <body> <table align="center" border="0" width="300" height="100" cellspacing="0" cellpadding="0"> <tr align="center" valign="top"> <td align="center" valign="top"> <script> /* Enter the 366 urls and names below you wish to go to for each day of the year. DO NOT use commas in the name or the script will not work. */ var daylinks=new Array() daylinks[1]="http://www.cnn.com,CNN" daylinks[2]="http://www.abcnews.com,ABCNews" daylinks[3]="http://www.cnet.com,ABC" daylinks[4]="http://www.geocities.com,Geocities" daylinks[5]="http://www.lycos.com,Lycos" daylinks[6]="http://www.infoseek.com,Infoseek" daylinks[7]="http://www.hotbot.com,Hotbot" daylinks[8]="http://www.tripod.com,Tripod" daylinks[9]="http://www.wsabstract.com,Website Abstraction" daylinks[10]="http://www.wired.com,Wired" daylinks[11]="http://www.hotwired.com,Hotwired.com" daylinks[12]="http://www.requestcode.com,Request Code" daylinks[13]="http://www.dynamicdrive.com,Dynamic Drive" var numdays=0 var daysa=new Array(31,28,31,30,31,30,31,31,30,31,30,31) var daysb=new Array(31,29,31,30,31,30,31,31,30,31,30,31) // for leap year var tdate=new Date() var tmonth=tdate.getMonth() var tyear=tdate.getFullYear() var tdays=tdate.getDate() remain=tyear % 4 if(remain!=0) // if not leap year { for(x=0;x<tmonth;x++) { numdays=numdays+daysa[x] } } else // if leap year { for(x=0;x<tmonth;x++) { numdays=numdays+daysb[x] } } today=numdays+tdays ranlink=daylinks[today].split(",") // separate the address and name document.write("The featured link for today is: <a href='"+ranlink[0]+"' title='"+ranlink[1]+"' target='_new'>"+ranlink[1]+"</a>") document.close() </script> </td> </tr> </table> </body> </html> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Join Date: Oct 2005
Posts: 17
|
Cou cant just use a script for a year. So use 366 days, or dont use it.
Do you want a random link script?
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, you may use a 624x80 instead of a 120x60. Let me repeat... A 120 x 60 button and no more that 3 lines of DEFAULT SIZE AND COLOR text. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: Oct 2003
Posts: 3,191
|
Quote:
but i only want maybe 60 days. the application is for a content rotation thing i'm doing in a member's area. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
try replacing the line that says:
Code:
today=numdays+tdays Code:
today=(numdays + tdays) % daylinks.length Code:
daylinks[0]="http://www.cnn.com,CNN" daylinks[1]="http://www.abcnews.com,ABCNews" daylinks[2]="http://www.cnet.com,ABC" daylinks[3]="http://www.geocities.com,Geocities" daylinks[4]="http://www.lycos.com,Lycos" daylinks[5]="http://www.infoseek.com,Infoseek" ...
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Oct 2003
Posts: 3,191
|
Quote:
great, it does resolve, and does not change on refresh, and i hope it will change again tomorrow. you are a king! THANKS SO MUCH!!!!!!!! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
I know I am
![]()
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |