Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-17-2003, 03:19 PM   PM User | #1
Lequinho
New to the CF scene

 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Lequinho is an unknown quantity at this point
Question how can I define a document

Hi, help me please, i need to put this javascript (It shows the date, but it is in portuguese, but that's not the problem) in my .png file:

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado")
var montharray=new
Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","No vembro","Dezembro")
document.write("<small><font color='000000' face='Arial' size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" , "+year+"</b></font></small>"),

but at the last line (document.write....) , the program says that the document is not defined.

I'm just a beginner i don't know how to define it.

Can someone tell me how will the code look like?

Help me please
Lequinho is offline  
Old 10-17-2003, 05:26 PM   PM User | #2
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
Remove the comma from the end of this line


document.write("<small><font color='000000' face='Arial' size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" , "+year+"</b></font></small>"),


It should be ok then
Mr J is offline  
Old 10-17-2003, 05:55 PM   PM User | #3
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
You already have this topic open twice:

http://www.codingforums.com/showthre...threadid=27675

http://www.codingforums.com/showthre...threadid=27674

You need to read our rules now.

http://www.codingforums.com/rules.htm
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:55 PM.


Advertisement
Log in to turn off these ads.