Click to See Complete Forum and Search --> : date message script from this site
darlakay
09-17-2003, 08:27 AM
i got the date message script from this site, but cannot get it to work.
http://javascript.internet.com/messages/date.html
when i load the page in IE, it gives this error:
Line: 77
Char: 1
Error: Object expected
Code: 0
line 77 on my page is:
document.write(dateMsg());
and the page does not display the message i put in for the current date. couldn't get it to display in netscape either. any help would be greatly appreciated.
thanks!
Khalid Ali
09-17-2003, 08:30 AM
It looks like this function
dateMsg()
is not being found by JS engine,make sure its defined in the JS code some where on the page
darlakay
09-17-2003, 08:42 AM
line 48 has:
function dateMsg() {
.....
is this what you mean? sorry i don't know much about this; i just got the script from this site. is there any way i can contact the author of this particular script?
thanks!
Khalid Ali
09-17-2003, 08:47 AM
post th elink to the page where yo are implementing the code or post the full code here( better if you can post the link)
darlakay
09-17-2003, 09:26 AM
http://www.uark.edu/~dksander/datemessage.html
thanks so much for your help!
Khalid Ali
09-17-2003, 09:35 AM
Take a look at the last line of the dateMsg() function
return("Today is " + mon + " " + day + ", " + year + "."); // returns
default
the comments are in 2 lines make sure that its like below
// returns default
In my opinion that should take care of it..let me know
darlakay
09-18-2003, 11:30 AM
that was it! i did go through looking for wrapped lines, but didn't see that one. thank you so much for your help!
this script is something that i had been needing for a long time and i am so appreciative that you have helped me to be able to use it!
gfin19
02-08-2005, 09:05 AM
Is it possible to edit the function to show the message for tomorrow?