HighDots Forums  

Re: looking for interactive calendar

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: looking for interactive calendar in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: looking for interactive calendar - 06-26-2003 , 02:51 PM






Dr John Stockton <spam (AT) merlyn (DOT) demon.co.uk> writes:

Quote:
For appreciably shorter code to give a somewhat similar display, see
URL:http://www.merlyn.demon.co.uk/js-date6.htm#DP>.

While the calendar itself works, there is a problem with the Show button
at the foot of the page; the code of the function InitCalendar is
displayed incorrectly. Is a fix obvious to any expert?
You are embedding the InitCalendar.toString() result directly into
the generated HTML. That means that the "<input type=button ..."
is treated as HTML.

You can change
InitCalendar.toString(),
to
InitCalendar.toString().replace(/</g,'&amp;lt;'),

For more safety, you could also change ">" and "&" into entities,
but apparently, none occur in the code of this or the other functions.

/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'


Reply With Quote
  #2  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: looking for interactive calendar - 06-27-2003 , 02:24 PM






Dr John Stockton <spam (AT) merlyn (DOT) demon.co.uk> writes:

Quote:
On the subject of dates, I have perceived a little-known feature which
can in fact cause error in operation. In, at least, my MSIE 4,

new Date('2003/04/05 06:07p')

is accepted; but now p is not short for /post meridiem/, but represents
the military P time zone, which contains Moscow (P = Putin). A
represents the Azores zone, Z represents GMT (Zulu time, which the true
Zulus do not normally use), and all the other letters have corresponding
meanings except for J, which yields NaN.
Since Microsoft just received 471 million dollar order from the US Army,
I guess it won't be changed any time soon .

(Military timezones by letter:
<URL:http://greenwichmeantime.com/info/timezone.htm>
They only needed 25, but I have no idea why it was "J" they left out.
Probably because it is too close to "I")

/L 'Living in Bravo times!'
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'


Reply With Quote
  #3  
Old   
Dr John Stockton
 
Posts: n/a

Default Re: looking for interactive calendar - 06-28-2003 , 02:23 PM



JRS: In article <k7b71ir0.fsf (AT) hotpop (DOT) com>, seen in
news:comp.lang.javascript, Lasse Reichstein Nielsen <lrn (AT) hotpop (DOT) com>
posted at Fri, 27 Jun 2003 20:24:19 :-
Quote:
Dr John Stockton <spam (AT) merlyn (DOT) demon.co.uk> writes:

On the subject of dates, I have perceived a little-known feature which
can in fact cause error in operation. In, at least, my MSIE 4,

new Date('2003/04/05 06:07p')

is accepted; but now p is not short for /post meridiem/, but represents
the military P time zone, which contains Moscow (P = Putin). A
represents the Azores zone, Z represents GMT (Zulu time, which the true
Zulus do not normally use), and all the other letters have corresponding
meanings except for J, which yields NaN.

(Military timezones by letter:
URL:http://greenwichmeantime.com/info/timezone.htm
They only needed 25, but I have no idea why it was "J" they left out.
Probably because it is too close to "I")
Yes, it's usual to drop either I or J if not all letters are needed. A
sensible system would have dropped I, since that looks like a digit; or,
better, kept I & J and dropped O.

The surprise was not that the letter-system existed, but that Javascript
knows of it.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.


Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.