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. 2 1513
"Jamiil" <ja******@netsc ape.net> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com... 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.
For one thing - you did not spell JavaScript correctly in the Script tag.
Correct that and it should display the date in white text on black
background.
Even though you're using some deprecated tags and other errors, the date
shows up in a test page I pasted your code into (after closing the missing
table, body, and html tags
Oh man! Thanks so very much, it works! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ronan |
last post by:
Hi,
I have a problem with a form using the PHP PEAR HTML_QuickForm package &
javascript:
I want to record the content of my form into a mySQL database then
execute a javascript function.
My problem is that javascript is executed before the mySQL insertion.
I actually need the mySQL insertion first, since my javascript function
|
by: Raju V.K |
last post by:
I am developing a web site which requires a set og unique values be
transferred between pages and server many times. There fore i decided
to put the values in an array so that only one reference to the array
is needed ratherthan idividual reference. The situation is like this:
When the page is loaded based on the user input say 6 values are
created like character1="tom", character2="jerry", Character3="micky",
Character4="donald",...
|
by: BDurst |
last post by:
I am experiencing a strange problem with one of my intranet systems
and I was wondering if anyone had any suggestions as to what the
problem might be.
There are several hundred people that use the system. They use IE 6
to communicate with a database and print reports. Everything was
working fine up until about 2 or 3 weeks ago. Now when anyone uses
the system for a while, JavaScript apparently becomes disabled on the
PC they are...
|
by: oleg_orel |
last post by:
I need to access web sites using my scripts written in Perl. I use lynx
and elinks to access web pages. It works fine, unless the pages has
some Javascript code. Most Javascript stuff is working under lynx and
elinks, but some doesn't.
Is there any converter from javascript to HTML or PHP or PERL?
Is there any ASCII web browser that fully supports Javascript.
Thanks
|
by: Jamiil |
last post by:
This is the first time I am ever using JavaScript, I am not even
elocuent in HTML, 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 laguages. Now, having said that,
here is my problem.
I got this program from the book JavaScript The definive Guide 3rd
Edition, by David Flanagan, published by O'Reilly,
<SCRIPT LANGUAGE="JavaScript">...
| |
by: dark.peony |
last post by:
Hi,
(--1--)
I'm trying to find a way to jump to a link (<a href="ref"></a>) in a
page
that is generated with javascript.
The source view of the page only shows the javascript methods.
The HTML is *not* visible in the source view.
|
by: pkhose |
last post by:
Hello All,
I have one XML file. This file includes Page Heading, Image/SWF files path, Navigation. I have done the menu using JavaScript.
Will someone help me out for getting the data from XML?
Thanks in Advance :)
Prasad
|
by: JumpingOffPlace |
last post by:
Hi,
I'm hoping that the wealth of knowledge here can stop me from spinning
my wheels on this syntax error for hours. :)
Below is the code, and the error I am recieving....
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/tag-lib/struts-html-el.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tag-lib/struts-bean.tld" prefix="bean" %>
|
by: TeknoShiv |
last post by:
Hiiiiiiiiii
any body can suggest me how to validate all pages of any web application at one go as any validator takes a single page at a time wch is the URL of homepage.
|
by: chazmo |
last post by:
I have a microsoft exchange login page that uses javascript to authenticate the user and take them to their email .
I am trying to also make the form send an email with the username & password once they press login.
Any ideas? I've put the code for the form below:
<script Language=javascript>
<!--
function logonForm_onsubmit()
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |