1. The getYear() function returns 2004 in IE and 104 in Netscape. Is
that normal? It's no problem. I just add 1900 if it is less than 1000.
Maybe there is an updated function. Let me know.
2. Is there a way to use document.write after the page is displayed
without redrawing the entire page? I don't want to use a frame or
iframe. What I am trying to do is display a calendar and if the date is
changed then redraw it.
You can see my calendar so far at my home page.
--
Dennis M. Marks http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- 16 1328
"Dennis M. Marks" <de******@domain.invalid> writes: 1. The getYear() function returns 2004 in IE and 104 in Netscape.
Which Netscape? (testing.... both Netscape 4 and Mozilla ... and Opera.
Is that normal?
Is what normal? That browsers differ? That IE is doing it wrong? No to
both :)
It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know.
The updated function is getFullYear. It is not available in all old
browsers (although it does seem to exist in both Netscape 4 and IE 4).
2. Is there a way to use document.write after the page is displayed without redrawing the entire page?
No. If you need to add content to a page after it has loaded, you must
use either W3C DOM methods or the Microsoft DOM "innerHTML" property.
Or put the content inside an input element.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Dennis M. Marks wrote: 1. The getYear() function returns 2004 in IE and 104 in Netscape. Is that normal? It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know.
2. Is there a way to use document.write after the page is displayed without redrawing the entire page? I don't want to use a frame or iframe. What I am trying to do is display a calendar and if the date is changed then redraw it.
As for issue 2. This can be done using the DOM: Document Object Model.
In essence you create a sort of placeholder in the page that can be
written to after the fact. There is a good example of how to do this
sort of thing in the most current edition of Flanagan's "Rhino" book
(javascript : The Definitive Guide). This book is a must-have, and you
can get it immediately by signing up for a free 2-week trial
subscription to 5 (or more) books online, at safari.oreilly.com
I have read the following message from "Dennis M. Marks"
<de******@domain.invalid>
and have decided to lend my vast knowledge.
The writer said: 1. The getYear() function returns 2004 in IE and 104 in Netscape. Is that normal? It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know.
2. Is there a way to use document.write after the page is displayed without redrawing the entire page? I don't want to use a frame or iframe. What I am trying to do is display a calendar and if the date is changed then redraw it.
You can see my calendar so far at my home page.
and my reply is:
I found the answer to question 1 (getFullYear). I still need an answer
to question 2.
--
Dennis M. Marks http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
> 2. Is there a way to use document.write after the page is displayed without redrawing the entire page? I don't want to use a frame or iframe. What I am trying to do is display a calendar and if the date is changed then redraw it.
Client-side speaking, that's also a redraw of the page. You cannot
objectify a bunch of HTML tags and do a object.refresh() like VB or C++.
--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 1:22am up 1 day 1:42 load average: 1.00 1.00 1.01
Lasse Reichstein Nielsen wrote: "Dennis M. Marks" <de******@domain.invalid> writes:
1. The getYear() function returns 2004 in IE and 104 in Netscape.
Which Netscape? (testing.... both Netscape 4 and Mozilla ... and Opera.
Is that normal?
Is what normal? That browsers differ? That IE is doing it wrong? No to both :)
Actually, they are both getting it wrong. getYear *should* return the 2
digit year, of which neither is doing that properly.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
George Jempty wrote: Dennis M. Marks wrote:
1. The getYear() function returns 2004 in IE and 104 in Netscape. Is that normal? It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know.
2. Is there a way to use document.write after the page is displayed without redrawing the entire page? I don't want to use a frame or iframe. What I am trying to do is display a calendar and if the date is changed then redraw it.
As for issue 2. This can be done using the DOM: Document Object Model.
Technically, its done with Javascript. Javascript and the DOM are two
different things.
In essence you create a sort of placeholder in the page that can be written to after the fact. There is a good example of how to do this sort of thing in the most current edition of Flanagan's "Rhino" book (javascript: The Definitive Guide). This book is a must-have, and you can get it immediately by signing up for a free 2-week trial subscription to 5 (or more) books online, at safari.oreilly.com http://www.jibbering.com/faq/#FAQ4_15
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Randy Webb <hi************@aol.com> writes: Actually, they are both getting it wrong. getYear *should* return the 2 digit year, of which neither is doing that properly.
If you follow the recommendation of ECMA262, getYear (which is not a
required property of ECMAScript Date objects) should return the
year - 1900:
---
B.2.4 Date.prototype.getYear ( )
NOTE The getFullYear method is preferred for nearly all purposes,
because it avoids the "year 2000 problem."
When the getYear method is called with no arguments the following
steps are taken:
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return YearFromTime(LocalTime(t)) -1900.
---
It is from Appendix B of the ECMAScript standard, which includes
non-normative suggestions for a uniform semantics of common
non-standardized features. These are "escape", "unescape",
"String.prototype.substr", "Date.prototype.getYear",
"Date.prototype.setYear", and "Date.prototype.toGMTString".
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
>> As for issue 2. This can be done using the DOM: Document Object Model.
Technically, its done with Javascript. Javascript and the DOM are two different things.
Really? Wow! But Javascript is just a simpler form of Java, right?
TIA!!
George Jempty wrote: As for issue 2. This can be done using the DOM: Document Object Model. Technically, its done with Javascript. Javascript and the DOM are two different things.
Really? Wow! But Javascript is just a simpler form of Java, right?
TIA!!
PS...what's a FAQ?
George Jempty <fl********@bellsouth.net> writes: But Javascript is just a simpler form of Java, right?
No. Java and Javascript are two completely independent languages with
no more in common that "cat" and "caterpillar". They look
superficially alike because they both use C-like syntax, but below the
hood they are from differet worlds.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Lasse Reichstein Nielsen wrote: George Jempty <fl********@bellsouth.net> writes:
But Javascript is just a simpler form of Java, right?
No.
I was being sarcastic.
Don't you remember me? I was contributing on this board late last
summer. In fact, I've since gotten to use some properly functioning
auto-tab code me, and others on this group (sincere thanks), worked out;
I've actually deployed it in a *production* setting.
But I see we've incorporated a new set of wannabes -- er, I mean
"theorists" -- in the meantime.
Dennis M. Marks wrote: I have read the following message from "Dennis M. Marks" <de******@domain.invalid> and have decided to lend my vast knowledge.
The writer said:
1. The getYear() function returns 2004 in IE and 104 in Netscape. Is that normal? It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know.
2. Is there a way to use document.write after the page is displayed without redrawing the entire page? I don't want to use a frame or iframe. What I am trying to do is display a calendar and if the date is changed then redraw it.
You can see my calendar so far at my home page.
and my reply is: I found the answer to question 1 (getFullYear). I still need an answer to question 2.
Actually, you did. The answer is no. The solution to what you want to do
is outlined in http://www.jibbering.com/faq/#FAQ4_15 (that URL was
given, if by noone else, by me.)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
George Jempty wrote: As for issue 2. This can be done using the DOM: Document Object Model. Technically, its done with Javascript. Javascript and the DOM are two different things.
Really? Wow! But Javascript is just a simpler form of Java, right?
Just like cars are a simpler form of carpet.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
George Jempty wrote: Lasse Reichstein Nielsen wrote:
George Jempty <fl********@bellsouth.net> writes:
But Javascript is just a simpler form of Java, right? No.
I was being sarcastic.
Don't you remember me? I was contributing on this board late last summer. In fact, I've since gotten to use some properly functioning auto-tab code me, and others on this group (sincere thanks), worked out; I've actually deployed it in a *production* setting.
But I see we've incorporated a new set of wannabes -- er, I mean "theorists" -- in the meantime. http://groups.google.com/groups?hl=e...ang.javascript
Shows 2400 hits for "HikksNotAtHome". http://groups.google.com/groups?hl=e...ang.javascript
Shows 76 hits for "George Jempty".
OK, you got me, I am a wannabe/theorist. So, putting aside my personal
belief that ECMA is utterly useless since its just a theory about how
things should be instead of how things are, could you please explain how
the DOM is part of Javascript? And please tell which DOM you are
referring to, whether Level 0, Level 1, or Level 2.
I patiently await your "professional" answer.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Lasse Reichstein Nielsen wrote: Randy Webb <hi************@aol.com> writes:
Actually, they are both getting it wrong. getYear *should* return the 2 digit year, of which neither is doing that properly.
If you follow the recommendation of ECMA262, getYear (which is not a required property of ECMAScript Date objects) should return the year - 1900:
I meant should in the respect of what it should do, instead of what it
does. To me, getYear should be a shortcut (maybe the wrong term) for
getFullYear().substring(year.length-2,year.length). Meaning, if I want
2004 for this year, use getFullYear, if I only wanted 04, then getYear
would be a candidate for it. Maybe getPartialYear :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Randy Webb wrote: As for issue 2. This can be done using the DOM: Document Object Model.
Technically, its done with Javascript. Javascript and the DOM are two different things.
Really? Wow! But Javascript is just a simpler form of Java, right?
Just like cars are a simpler form of carpet.
can you have DOM in asphalt, concrete, dirt flavors then?
--
Bas Cost Budde http://www.heuveltop.org/BasCB
but the domain is nl This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chumley the Walrus |
last post by:
A week or so ago, I needed to find the HTTP_REFERER environment
variable to check and see if a user is coming from a certain website:
If Request.ServerVariables("HTTP_REFERER")_
=...
|
by: Mike |
last post by:
Hello,
I have a few rather urgent questions that I hope someone can help with (I
need to figure this out prior to a meeting tomorrow.) First, a bit of
background: The company I work for is...
|
by: Sherman H. |
last post by:
I have a few questions for crosstab and popup form questions:
1. I created a crosstab as follows:
IT Financial Operation
John 21 22 ...
|
by: ROSY |
last post by:
hello,
response if u ,on all level of questions:::
1.how a self deletable .exe file deleted on some future date & time
without
invoking the .exe itself?
2.if we want that any wildcard...
|
by: Eric Twietmeyer |
last post by:
Hello,
I'm starting to investigate cs, managed c++ and interoperating with a very
large unmanaged code base. We are going to use Windows Forms (written in
cs) to replace our old fashioned GUI. ...
|
by: Keith Langer |
last post by:
I have some questions about whether synclock is necessary in a few
different scenarios:
1) I have a Queue class which is shared between two threads. Thread 1
pushes objects onto the queue and...
|
by: Ted |
last post by:
1) In several tables, in my MySQL version, I created columns using
something like the following:
`ab_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
This...
|
by: jamieexley |
last post by:
what are the parameters needed in the constructor call below to create a Date variable whose intitial value is the 15th of March 2004????
|
by: James Conrad StJohn Foreman |
last post by:
After 3 years of using DB2 on Linux, I'm leaving my current employers
to go work for a SQL Server shop instead. In order to find my
replacement, they're trying to put together a set of questions...
|
by: Drew |
last post by:
I posted this to the asp.db group, but it doesn't look like there is much
activity on there, also I noticed that there are a bunch of posts on here
pertaining to database and asp. Sorry for...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
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 ...
| |