If not Javascript, PHP with the date(); function can be used as a string.
echo date('l jS \of F Y');
I'm trying the script below to display current day and date. But Internet Explorer displays this message when accessing the page:"To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options ....." After I tell IE to proceed anyway, the day and date appear just fine.
This does not happen with FireFox.
How can I get around this IE message? Does IE throw up this message anytime it see JavaScript? There has to be a way around this.
My script:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT Language="JavaScript">
<!-- hide from old browsers
function GetDay(intDay){
var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday")
return DayArray[intDay]
}
function GetMonth(intMonth){
var MonthArray = new Array("January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December")
return MonthArray[intMonth]
}
function getDateStrWithDOW(){
var today = new Date()
var year = today.getYear()
if(year<1000) year+=1900
var todayStr = GetDay(today.getDay()) + ", "
todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
todayStr += ", " + year
return todayStr
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF">
<SCRIPT Language="JavaScript">
<!-- hide from old browsers
document.write(getDateStrWithDOW())
//-->
</SCRIPT>
</body>
</html>