This is the first time I am ever using JavaScript, I am not even
eloquent in HTML, and all I am is someone who has Microsoft/Netscape
Webpage developers. What I am trying to say is that I am not an expert
in any of these webpage developing languages. Now, having said that,
here is my problem.
I got this program from the book JavaScript "The definitive Guide 3rd
Edition, by David Flanagan, published by O'Reilly,
<SCRIPT LANGUAGE="JavaS cript">
function printDate(){
var date = new Date();
document.write( date.toLocaleSt ring());
}
</SCRIPT>
The book shows that this part of the puzzel goes in the <HEAD> and
</HEAD> tags, the implementation of this function is within the <BODY>
and </BODY> tags. However, when implementing the function, I get
nothing, it does not display de date, it does nothing. Here is the
code:
<html>
<head>
....
<title>Jamiil 's Home Page</title>
<SCRIPT LANGUAGE="JavaS cript">
function printDate(){
var date = new Date();
document.write( date.toLocaleSt ring());
}
</SCRIPT>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#1 11111" width="103%"
id="AutoNumber3 " bgcolor="#00000 0">
..............
</table>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#F FFFFF" width="10%"
id="AutoNumber1 " height="67" bgcolor="#00000 0">
<tr>
<td width="1009%" height="516">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#F FFFFF" width="100%"
id="AutoNumber4 " bgcolor="#00000 0" height="523">
<tr>
<td width="100%" bgcolor="#00000 0" height="142">
<img border="0" src="allah.gif" align="left" width="126"
height="141"></td>
</tr>
<tr>
<td width="100%" height="19"><b> <font color="#FFFFFF" size="1">
//-----> HERE IS THE CODE IN QUESTION <--------
<SCRIPT LANGUAGE="JavaS critp">
printDate();
</SCRIPT>
</font></b></td>
</tr>
<tr>
..........
Now, can you tell me what am I doing wrong and how to get the current
date to be displayed in the table cell?
TIA.
eloquent in HTML, and all I am is someone who has Microsoft/Netscape
Webpage developers. What I am trying to say is that I am not an expert
in any of these webpage developing languages. Now, having said that,
here is my problem.
I got this program from the book JavaScript "The definitive Guide 3rd
Edition, by David Flanagan, published by O'Reilly,
<SCRIPT LANGUAGE="JavaS cript">
function printDate(){
var date = new Date();
document.write( date.toLocaleSt ring());
}
</SCRIPT>
The book shows that this part of the puzzel goes in the <HEAD> and
</HEAD> tags, the implementation of this function is within the <BODY>
and </BODY> tags. However, when implementing the function, I get
nothing, it does not display de date, it does nothing. Here is the
code:
<html>
<head>
....
<title>Jamiil 's Home Page</title>
<SCRIPT LANGUAGE="JavaS cript">
function printDate(){
var date = new Date();
document.write( date.toLocaleSt ring());
}
</SCRIPT>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#1 11111" width="103%"
id="AutoNumber3 " bgcolor="#00000 0">
..............
</table>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#F FFFFF" width="10%"
id="AutoNumber1 " height="67" bgcolor="#00000 0">
<tr>
<td width="1009%" height="516">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#F FFFFF" width="100%"
id="AutoNumber4 " bgcolor="#00000 0" height="523">
<tr>
<td width="100%" bgcolor="#00000 0" height="142">
<img border="0" src="allah.gif" align="left" width="126"
height="141"></td>
</tr>
<tr>
<td width="100%" height="19"><b> <font color="#FFFFFF" size="1">
//-----> HERE IS THE CODE IN QUESTION <--------
<SCRIPT LANGUAGE="JavaS critp">
printDate();
</SCRIPT>
</font></b></td>
</tr>
<tr>
..........
Now, can you tell me what am I doing wrong and how to get the current
date to be displayed in the table cell?
TIA.
Comment