468,136 Members | 1,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

Script not right in Opera ?


I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P>
and using Opera the suffixed dates in the yellow box appear in a single
long line instead of in the obvious weekly manner. It's OK in IE 4 & 6.

That sounds as if if (++k%7==0) document.writeln() is not working
in Opera.

Any explanation and/or suggestions? In particular, I'd like to know
whether the circumstances will apply elsewhere on the site.
In IE4, using my defaults, proportional and fixed fonts were of similar
sizes, and that was good. In IE6, defaults, fixed is about 25% too big.
With a CSS setting for PRE and TT of 80%, it's about right locally in
IE6. I intend to upload that CSS with this (give it time to get
there!); please let me know if in any normal browser with normal
settings, whatever that may mean, the fixed is not about the right size.

No change appears needed in the boxes that show code.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 24 '06 #1
7 1138
Dr J R Stockton said the following on 10/24/2006 1:09 PM:
I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P>
and using Opera the suffixed dates in the yellow box appear in a single
long line instead of in the obvious weekly manner. It's OK in IE 4 & 6.

That sounds as if if (++k%7==0) document.writeln() is not working
in Opera.
Any explanation and/or suggestions? In particular, I'd like to know
whether the circumstances will apply elsewhere on the site.
It doesn't seem to honor the writeln() as adding a line to the code
(although that is precisely what writeln() is supposed to do) with an
empty string argument to the writeln(). In tinkering with it, changing:

document.writeln() to document.writeln('')

Makes it line up properly in Opera while leaving the formatting intact
for IE7 and Firefox.
In IE4, using my defaults, proportional and fixed fonts were of similar
sizes, and that was good. In IE6, defaults, fixed is about 25% too big.
With a CSS setting for PRE and TT of 80%, it's about right locally in
IE6. I intend to upload that CSS with this (give it time to get
there!); please let me know if in any normal browser with normal
settings, whatever that may mean, the fixed is not about the right size.
Firefox, with the current CSS of 80% makes it almost too small to read
the text. Personally, I would leave the PRE text at normal size. Its a
bit larger in IE and Opera but it leaves it readable in Firefox.

I also don't see a bolded date in Firefox with it set at 80%. Removing
the 80% and viewing it I get the bolded date. Another reason not to make
it 80%.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 24 '06 #2
Dr J R Stockton wrote:
I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P>
and using Opera the suffixed dates in the yellow box appear in a single
long line instead of in the obvious weekly manner. It's OK in IE 4 & 6.
Correct: observed in versions 7.03, 8.54, and 9.01.
That sounds as if if (++k%7==0) document.writeln() is not working
in Opera.

Any explanation and/or suggestions?
It appears to object to the lack of an argument, though nothing appears
in the error console. Passing an empty string generates the line terminator.
In particular, I'd like to know whether the circumstances will apply
elsewhere on the site.
Anywhere where the writeln method is called with no arguments.

[snip]

Mike
Oct 24 '06 #3
In message <Hd********************@telcove.net>, Tue, 24 Oct 2006
18:31:12, Randy Webb <Hi************@aol.comwrites
>Dr J R Stockton said the following on 10/24/2006 1:09 PM:
>I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P>
and using Opera the suffixed dates in the yellow box appear in a single
long line instead of in the obvious weekly manner. It's OK in IE 4 & 6.
That sounds as if if (++k%7==0) document.writeln() is not
working
in Opera.
Any explanation and/or suggestions? In particular, I'd like to know
whether the circumstances will apply elsewhere on the site.

It doesn't seem to honor the writeln() as adding a line to the code
(although that is precisely what writeln() is supposed to do) with an
empty string argument to the writeln(). In tinkering with it, changing:

document.writeln() to document.writeln('')

Makes it line up properly in Opera while leaving the formatting intact
for IE7 and Firefox.
And for IE6 (and, it seems likely, for all). Done, site-wide; and
noted. My thanks.

<FAQENTRYI don't see anything much in the FAQ on compatibility between
browsers. ISTM that a little could well be said in Section 4, with a
link to a FAQ NOTE.

The Note could list in some fashion when new features (e.g.
getElementById, look-ahead in RegExps) appeared; and hoe to avoid bugs
in particular browsers (e.g. that writeln one).

No doubt several here could contribute examples. </FAQENTRY>

>In IE4, using my defaults, proportional and fixed fonts were of similar
sizes, and that was good. In IE6, defaults, fixed is about 25% too big.
With a CSS setting for PRE and TT of 80%, it's about right locally in
IE6. I intend to upload that CSS with this (give it time to get
there!); please let me know if in any normal browser with normal
settings, whatever that may mean, the fixed is not about the right size.

Firefox, with the current CSS of 80% makes it almost too small to read
the text. Personally, I would leave the PRE text at normal size. Its a
bit larger in IE and Opera but it leaves it readable in Firefox.

I also don't see a bolded date in Firefox with it set at 80%. Removing
the 80% and viewing it I get the bolded date. Another reason not to
make it 80%.

While respecting that argument, I however think width-compatibility in
IE6 is more important than size in Firefox - though if/when I get
Firefox I may change my mind. I have however changed "80%" to "smaller"
which change has no noticeable effect in IE6 but may have had in others.

In one or two places I've noticed, there are in PRE visual
double-smallers in IE6 which were visual single-smallers in IE4. RSVP,
people, if any are noticed.
Now that I have XP and not 98, it appears that I may no longer be able
to use 32-bit MiniTrue (mtr) though 16-bit MiniTrue may be OK (see sig).
FINDSTR being so much better than FIND will help; but is there a good XP
command-line global RegExp-using search[-&-replace [with backup]] tool?

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/>
Oct 25 '06 #4
Dr J R Stockton said the following on 10/25/2006 7:54 AM:
In message <Hd********************@telcove.net>, Tue, 24 Oct 2006
18:31:12, Randy Webb <Hi************@aol.comwrites
>Dr J R Stockton said the following on 10/24/2006 1:09 PM:
<snip>
>>In IE4, using my defaults, proportional and fixed fonts were of similar
sizes, and that was good. In IE6, defaults, fixed is about 25% too big.
With a CSS setting for PRE and TT of 80%, it's about right locally in
IE6. I intend to upload that CSS with this (give it time to get
there!); please let me know if in any normal browser with normal
settings, whatever that may mean, the fixed is not about the right size.
Firefox, with the current CSS of 80% makes it almost too small to read
the text. Personally, I would leave the PRE text at normal size. Its a
bit larger in IE and Opera but it leaves it readable in Firefox.

I also don't see a bolded date in Firefox with it set at 80%. Removing
the 80% and viewing it I get the bolded date. Another reason not to
make it 80%.


While respecting that argument, I however think width-compatibility in
IE6 is more important than size in Firefox - though if/when I get
Firefox I may change my mind.
I don't see a "width-compatibility" issue in IE7 because the blue box is
100% width of the page and nothing to the right and it is wider than the
textarea above it. I see the same in Opera and Firefox as well. So,
unless I am misunderstanding you somewhere, I don't see it.
I have however changed "80%" to "smaller" which change has no noticeable
effect in IE6 but may have had in others.
It makes the bolded date show up in Firefox. The bolded date in IE7 is
hard to distinguish without looking for it. But that was there before
and I didn't notice it. Not sure if it is the PRE doing it or not though.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 25 '06 #5
In message <sP********************@telcove.net>, Wed, 25 Oct 2006
12:39:56, Randy Webb <Hi************@aol.comwrites
>
I don't see a "width-compatibility" issue in IE7 because the blue box
is 100% width of the page and nothing to the right and it is wider than
the textarea above it. I see the same in Opera and Firefox as well.
So, unless I am misunderstanding you somewhere, I don't see it.
That aspect is probably not worth pursuing while I don't have access to
an Opera on which I can see the effect of changes.

My browser settings are default, more or less. My LOCAL homepage sets
itself to 640px wide (screen is 1024 px), and by visiting it I keep my
page-design window at that width. That gives a reasonable number of
words of Times New Roman per line. The code-viewing boxes are sized to
fill that, and luckily give me 70 characters per line. If PRE as sized
by CSS gives a similar number of characters within the page width, I
shall be happy.

I then hope that other systems will give a reasonable rendition with
reasonable settings, using a "normal-size" screen.
>I have however changed "80%" to "smaller" which change has no
noticeable effect in IE6 but may have had in others.

It makes the bolded date show up in Firefox. The bolded date in IE7 is
hard to distinguish without looking for it. But that was there before
and I didn't notice it. Not sure if it is the PRE doing it or not though.
You have more chance now, and I've improved the coding.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 26 '06 #6
Dr J R Stockton said the following on 10/26/2006 10:16 AM:
In message <sP********************@telcove.net>, Wed, 25 Oct 2006
12:39:56, Randy Webb <Hi************@aol.comwrites
>>
I don't see a "width-compatibility" issue in IE7 because the blue box
is 100% width of the page and nothing to the right and it is wider
than the textarea above it. I see the same in Opera and Firefox as
well. So, unless I am misunderstanding you somewhere, I don't see it.

That aspect is probably not worth pursuing while I don't have access to
an Opera on which I can see the effect of changes.
The effects I am seeing are the exact same as in IE7.
My browser settings are default, more or less. My LOCAL homepage sets
itself to 640px wide (screen is 1024 px), and by visiting it I keep my
page-design window at that width. That gives a reasonable number of
words of Times New Roman per line. The code-viewing boxes are sized to
fill that, and luckily give me 70 characters per line. If PRE as sized
by CSS gives a similar number of characters within the page width, I
shall be happy.
The blue box that contains the calendar isn't sized to be 640px wide
though. If you want it to give you 70 characters per line then set it's
width in the CSS. Resize the window larger and you can see the effect
(even in IE) with the blue bordered box. It's width isn't set so it
defaults to 100% width and the calendar aligns left. If it were centered
under the textarea with it's width set to the same as the textarea then
the browser window width would become a moot issue. I looked, briefly,
to see if there was a simple way to dictate the width of that calendar
box and got tired of looking from function to function to find the code
that writes out that calendar.
I then hope that other systems will give a reasonable rendition with
reasonable settings, using a "normal-size" screen.
My default browser window is about 800px wide and I don't see the same
effect that I think you are after though.
>>I have however changed "80%" to "smaller" which change has no
noticeable effect in IE6 but may have had in others.

It makes the bolded date show up in Firefox. The bolded date in IE7 is
hard to distinguish without looking for it. But that was there before
and I didn't notice it. Not sure if it is the PRE doing it or not though.

You have more chance now, and I've improved the coding.
The red definitely improves the readability of it.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 26 '06 #7
In message <OZ********************@telcove.net>, Fri, 27 Oct 2006
07:19:55, Randy Webb <Hi************@aol.comwrites
>
The blue box that contains the calendar isn't sized to be 640px wide
though.
I don't want to force that on others; I merely say that it fits nicely
in 640 px with my default Times New Roman.
If you want it to give you 70 characters per line then set it's width
in the CSS.
70 characters per line is for fixed-pitch fonts. For the green-bordered
code-displaying boxes (such as that for WeekNoStr just above) that's set
in the script-written HTML - BoxX in include1.js. For the yellow output
boxes, I want to allow them to stick out to the right if there are "too
many" characters per line, but to fit for up to about 70.
Resize the window larger and you can see the effect (even in IE) with
the blue bordered box.
? I see no problem - except that with Verdana and Wide Latin, some
internal line-wrapping occurs. Those who choose such fonts (and Agency
FB) need to expect peculiarities.
It's width isn't set so it defaults to 100% width and the calendar
aligns left. If it were centered under the textarea with it's width set
to the same as the textarea then the browser window width would become
a moot issue. I looked, briefly, to see if there was a simple way to
dictate the width of that calendar box and got tired of looking from
function to function to find the code that writes out that calendar.

It's "FrmB", in HTML; easily found by searching for "Gregorian".
Javascript only inserts the varying parts. Though it's been tweaked
since, it was IIRC written before I had DynWrite.

It's a good idea to read the newsgroup and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 27 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by S P Arif Sahari Wibowo | last post: by
7 posts views Thread by news frontiernet.net | last post: by
38 posts views Thread by | last post: by
28 posts views Thread by Randy Starkey | last post: by
15 posts views Thread by remi | last post: by
5 posts views Thread by camphor | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.