TheGeek Posted November 13, 2005 Share Posted November 13, 2005 hi, i have seen the ads where you can sign up to recieve a new joke everyday to your email. Is there a html code or a website service that can do this by it's self. I have a website and i want to add a table that will keep changing it's jokes everyday and get new jokes from a website everyday. If i need to be more clear let me know thanks Link to comment Share on other sites More sharing options...
BigMoosie Posted November 13, 2005 Share Posted November 13, 2005 Does your server support PHP? Link to comment Share on other sites More sharing options...
TheGeek Posted November 13, 2005 Author Share Posted November 13, 2005 no,only html Link to comment Share on other sites More sharing options...
BigMoosie Posted November 13, 2005 Share Posted November 13, 2005 This will loop through a series of phrases to be displayed, changing once per day at midnight GMT: <SCRIPT type="text/javascript"><!-- function getString(){ var a=[]; a[a.length]="Are children who act in rated (R) movies allowed to see them?"; a[a.length]="Who gets to keep the pennies in a wishing well?"; a[a.length]="Is there anything easier done than said?"; a[a.length]="Is it possible for a narcoleptic to have insomnia?" a[a.length]="Did you know there is a page 666 in The Bible?"; a[a.length]="Money is the root of all evil, yet churches still ask for it."; a[a.length]="If I think, and therefore I am, am I just a thought?"; a[a.length]="If you try to fail and succeed, what did you just do?"; a[a.length]="Quizzes are quizzical so tests are..." a[a.length]="Why do they sterilize needles for lethal injections?" a[a.length]="God is love and love is blind, therefore God is blind."; a[a.length]="What color is a chameleon on a mirror?" a[a.length]="What happens if you get scared half to death twice?"; a[a.length]="Why is the alphabet in that order? Is it because of that song?"; a[a.length]="I wanna get a tattoo all over my body of me but taller."; a[a.length]="Mafia: organised crime. Government: unorganised crime."; a[a.length]="Where there's a will, I want to be in it."; a[a.length]="Is it true that cannibals don't eat clowns cause they taste funny."; a[a.length]="Sex is not the answer. Sex is the question. Yes is the answer."; a[a.length]="7-11 is always open, why do they have locks?"; return a[Math.floor((new Date()).getTime()/(1000*60*60*24))%a.length]; } document.write(getString()); //--></SCRIPT> Link to comment Share on other sites More sharing options...
TheGeek Posted November 14, 2005 Author Share Posted November 14, 2005 k thanks for your help but the problem is that the second one keeps comming and nothing else comes when i use: <SCRIPT type="text/javascript"><!-- function getString(){ var a=[]; a[a.length]="Are children who act in rated (R) movies allowed to see them?"; a[a.length]="Who gets to keep the pennies in a wishing well?"; a[a.length]="Is there anything easier done than said?"; a[a.length]="Is it possible for a narcoleptic to have insomnia?" a[a.length]="Did you know there is a page 666 in The Bible?"; a[a.length]="Money is the root of all evil, yet churches still ask for it."; a[a.length]="If I think, and therefore I am, am I just a thought?"; a[a.length]="If you try to fail and succeed, what did you just do?"; a[a.length]="Quizzes are quizzical so tests are..." a[a.length]="Why do they sterilize needles for lethal injections?" a[a.length]="God is love and love is blind, therefore God is blind."; a[a.length]="What color is a chameleon on a mirror?" a[a.length]="What happens if you get scared half to death twice?"; a[a.length]="Why is the alphabet in that order? Is it because of that song?"; a[a.length]="I wanna get a tattoo all over my body of me but taller."; a[a.length]="Mafia: organised crime. Government: unorganised crime."; a[a.length]="Where there's a will, I want to be in it."; a[a.length]="Is it true that cannibals don't eat clowns cause they taste funny."; a[a.length]="Sex is not the answer. Sex is the question. Yes is the answer."; a[a.length]="7-11 is always open, why do they have locks?"; return a[Math.floor((new Date()).getTime()/(1000*60*60*24))%a.length]; } document.write(getString()); //--></SCRIPT> Link to comment Share on other sites More sharing options...
doG Posted November 14, 2005 Share Posted November 14, 2005 k thanks for your help but the problem is that the second one keeps comming and nothing else comes when i use: Did you try it after the date changed? Link to comment Share on other sites More sharing options...
TheGeek Posted November 14, 2005 Author Share Posted November 14, 2005 i tried changing the date on my system. where does it get it's date from? Link to comment Share on other sites More sharing options...
TheGeek Posted November 14, 2005 Author Share Posted November 14, 2005 sorry, got it to work thanks. How do i add more jokes to the code? Link to comment Share on other sites More sharing options...
BigMoosie Posted November 14, 2005 Share Posted November 14, 2005 Just continue the pattern: a[a.length]="text here"; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now