l1rz1m
asked on
how to make an auto date update
hello,
i want to know how can i make the date change itself in www.onlinebetcasino.com (on your left) News & Events.
In addition, i need a code that will allow customers to send mail on this page :
http://onlinebetcasino.com/sup.html
Name - Email - Message, i just need the code that will allow to get mails when submit the form.
Thank you alot
i want to know how can i make the date change itself in www.onlinebetcasino.com (on your left) News & Events.
In addition, i need a code that will allow customers to send mail on this page :
http://onlinebetcasino.com/sup.html
Name - Email - Message, i just need the code that will allow to get mails when submit the form.
Thank you alot
The simple javascript make this possible.
put scri[t in head section of your html and
"<DIV id="clock" style="FONT-SIZE: 15px;"></DIV>"
where you want to show your watch
thanks
put scri[t in head section of your html and
"<DIV id="clock" style="FONT-SIZE: 15px;"></DIV>"
where you want to show your watch
thanks
<SCRIPT language=javaScript>
onload = function() {
thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
thistime = hours+":"+minutes+":"+seconds
document.getElementById('clock').innerHTML=thistime
var timer=setTimeout("clockon()",200)
}
</SCRIPT>
ASKER
Hello,
Thank you all for your solutions, i think you didn't understand what i wanted exactly, so let me explain it :
In the page of Index.html you can see the section of News & Events, before, i had to edit the page manually and edit the date for exemple if today is 24/04/2010 i have to download the page and open it with FrontPage and edit the date to 25/04/2010 and so on upload it again for update the News & Events,
Now i want this date which is 24/04/2010 change itself from 24/04/2010 to 25/04/2010 automatically, no need to do it manually, you got me now? any idea?
Thank you
Thank you all for your solutions, i think you didn't understand what i wanted exactly, so let me explain it :
In the page of Index.html you can see the section of News & Events, before, i had to edit the page manually and edit the date for exemple if today is 24/04/2010 i have to download the page and open it with FrontPage and edit the date to 25/04/2010 and so on upload it again for update the News & Events,
Now i want this date which is 24/04/2010 change itself from 24/04/2010 to 25/04/2010 automatically, no need to do it manually, you got me now? any idea?
Thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello,
I tried this solution but it didn't work, there must be a mistake that i have done, please check the source code of the page http://www.onlinebetcasino.com/index.html
Thank you
I tried this solution but it didn't work, there must be a mistake that i have done, please check the source code of the page http://www.onlinebetcasino.com/index.html
Thank you
Move the script I gave above, to the bottom of the <HEAD> section -- put it after all the CSS, and just a line before the closing </HEAD> tag. See if that helps. All METAs should come before CSS and javascript.
This line I gave you --
<!--#config timefmt="%a %d %b %Y -- %I:%M %p" --><!--#echo var="DATE_LOCAL" -->
change it to --
#config timefmt="%a %d %b %Y -- %I:%M %p" #echo var="DATE_LOCAL"
If server side includes are enabled on your webserver, that will give the local date and time where the server is located. See if that works.
Do you have javascript disabled in your browser? Mine (same code as I gave you) works for me. Maybe enclose this in a <FONT> tag to make sure it is visible and not hidden.
This line I gave you --
<!--#config timefmt="%a %d %b %Y -- %I:%M %p" --><!--#echo var="DATE_LOCAL" -->
change it to --
#config timefmt="%a %d %b %Y -- %I:%M %p" #echo var="DATE_LOCAL"
If server side includes are enabled on your webserver, that will give the local date and time where the server is located. See if that works.
Do you have javascript disabled in your browser? Mine (same code as I gave you) works for me. Maybe enclose this in a <FONT> tag to make sure it is visible and not hidden.
ASKER
Hi,
I did what you said, check this page to see what it shows :
http://www.onlinebetcasino.com/test/test.html
Please help.
Thank you
I did what you said, check this page to see what it shows :
http://www.onlinebetcasino.com/test/test.html
Please help.
Thank you
Well SSI is not enabled on your web server. I guess that won't work, but the javascript should work.
ASKER
so any idea please?
The javascript I gave you should have worked. Maybe there is something on your site that is blocking it. How often do you need to update the date?
ASKER
the date in News & events must be changed daily with a new date. is there any code with php for exemple?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
any you using PHP:
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT=5*60>
</HEAD>
That reloads a page every 5 minutes (5 times 60 seconds.). You can also do this in javascript if interested.