...

View Full Version : how can I define a document



Lequinho
10-17-2003, 04:19 PM
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","Novembro","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

Mr J
10-17-2003, 06:26 PM
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

Spookster
10-17-2003, 06:55 PM
You already have this topic open twice:

http://www.codingforums.com/showthread.php?s=&threadid=27675

http://www.codingforums.com/showthread.php?s=&threadid=27674

You need to read our rules now.

http://www.codingforums.com/rules.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum