On Mar 2, 11:47 am, Diogenes <nos...@nospam.netwrote:
You have a div with id edate and an inferred global variable edate.
IE will create a global variable for the div since it is declared
before you try to assign a value to the inferred global edate.
When you try to assign a date object to edate, IE barfs. There are a
couple of solutions:
- keep the javascript variable edate local to the function (which you
should have done anyway)
- Change the name of either the div or the variable
- Don't use the variable at all (it isn't necessary)
I'd suggest that where you have:
str = year + ',' + (month-1) + ',' + day + ',19,0,0'
old = s3 = 'new Date(' + str + ')'
edate = eval( old )
document.getElementById('title').innerHTML = edate.toString()
you should use (wrapped for posting):
document.getElementById('title').innerHTML =
new Date(year, (month-1), day, 19, 0, 0);
and you will remove the unnecessary use of eval as well.
--
Rob