Velocity Reviews > IE5/6, but not IE4, doing unexpected

# IE5/6, but not IE4, doing unexpected

Dr John Stockton
Guest
Posts: n/a

 10-14-2005

In <URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3> the button "Table
III Reversed" executes

function BCPTableIII() { var GN, DM, Ro, CY
document.write("\t\t\tCalculated Table III",
"<fieldset>\t\t\t THE GOLDEN NUMBERS\t\t SL P F M\n")
for (GN=19 ; GN ; GN--) document.write(Prfx(GN, 3, " "))
document.write("<hr>\n")
for (Ro=DM=21 ; Ro<=51 ; Ro++, DM++) {
for (GN=19 ; GN ; GN--) {
CY = (11*GN + DM + 6) % 30
if (Ro==49 && GN==11) { Ro++
document.write("\t\t\t\t ", RightCols(DM-1), "\n\t\t\t")}
document.write(Prfx(CY, 3, " ")) }
if (DM==50) DM--
document.write(RightCols(DM), Ro%5==0 ? "<hr>\n" : "\n" ) }
document.write("<\/fieldset>") }

in which the output of RightCols is not germane, and we have

function Prfx(Q, L, c) { var s = Q+"" // ??
// if (!c) var c = ' '
if (c.length>0) while (s.length<L) { s = c+s } ;
return s }

and the output (chopped top, bottom, and right) is in IE4 as expected

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19

However in a later IE, the first or second space of a row is omitted in
rows where the first column of numbers is single-digit. There's no
problem with other single-digit entries, as you can see.

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19

I cannot easily experiment, as the IE>4 machine is a mile away.

What's the explanation, and the suggested fix?

--
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.

cwdjrxyz@yahoo.com
Guest
Posts: n/a

 10-16-2005

Dr John Stockton wrote:
> In <URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3> the button "Table
> III Reversed" executes
>
> function BCPTableIII() { var GN, DM, Ro, CY
> document.write("\t\t\tCalculated Table III",
> "<fieldset>\t\t\t THE GOLDEN NUMBERS\t\t SL P F M\n")
> for (GN=19 ; GN ; GN--) document.write(Prfx(GN, 3, " "))
> document.write("<hr>\n")
> for (Ro=DM=21 ; Ro<=51 ; Ro++, DM++) {
> for (GN=19 ; GN ; GN--) {
> CY = (11*GN + DM + 6) % 30
> if (Ro==49 && GN==11) { Ro++
> document.write("\t\t\t\t ", RightCols(DM-1), "\n\t\t\t")}
> document.write(Prfx(CY, 3, " ")) }
> if (DM==50) DM--
> document.write(RightCols(DM), Ro%5==0 ? "<hr>\n" : "\n" ) }
> document.write("<\/fieldset>") }
>
> in which the output of RightCols is not germane, and we have
>
> function Prfx(Q, L, c) { var s = Q+"" // ??
> // if (!c) var c = ' '
> if (c.length>0) while (s.length<L) { s = c+s } ;
> return s }
>
> and the output (chopped top, bottom, and right) is in IE4 as expected
>
> 28 17 6 25 14
> 29 18 7 26 15
> 0 19 8 27 16
> ---------------
> 1 20 9 28 17
> 2 21 10 29 18
> 3 22 11 0 19
>
>
> However in a later IE, the first or second space of a row is omitted in
> rows where the first column of numbers is single-digit. There's no
> problem with other single-digit entries, as you can see.
>
> 28 17 6 25 14
> 29 18 7 26 15
> 0 19 8 27 16
> ---------------
> 1 20 9 28 17
> 2 21 10 29 18
> 3 22 11 0 19
>
>
> I cannot easily experiment, as the IE>4 machine is a mile away.
>
> What's the explanation, and the suggested fix?

Since I have several browsers installed I checked your mentioned page
and button on several. My SBC/Yahoo DSL browser(just a modified IE6)
shows the placement problems you mention. The latest Opera displays the
table correctly. However the latest Mozilla family browsers(Mozilla,
Firefox, and Netscape) only give some of the top headings when you
click the button. The progress bar halts at about 1/2 way, and does not
move and output the bulk of the table, at least for the 3 minutes I
alert with the message "File include1.js end fault, RSVP!". When you OK
the alert, the browser goes down. This likely is of little importance
since the Netscape 4.8 is all but dead in most countries.

Your page is fairly complicated and you use a style considerably
different from what I use, so I do notnow have time to attempt to
determine exactly what is going on. I now do nearly all positioning
with CSS , often using script to calculate the CSS positioning as I did
in the full year calendar display output for my perpetual calendar. In
cases that would require a document.write in javascript, I now have to
do that portion of the code in php on the server, as document.write can
not be processed in a true html 1.1 page served as
application/xhtml+xml, which is parsed as XML. A php include at the top
of the php page converts the code to html 4.01 strict for outmoded
browsers, such as the IE6, that will not accept the mentioned mime
type.

Of course, you only mentioned IE browsers, so what your page does on
other browsers may or may not be of interest to you.

cwdjrxyz@yahoo.com
Guest
Posts: n/a

 10-16-2005

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> However the latest Mozilla family browsers(Mozilla,
> Firefox, and Netscape) only give some of the top headings when you
> click the button. The progress bar halts at about 1/2 way, and does not
> move and output the bulk of the table, at least for the 3 minutes I
> waited.

I have a screen capture for you at
http://www.cwdjr.info/temp/table3.jpg that shows exactly where output
of table 3 stops on the Firefox browser. Perhaps this will help you
narrow the portion of the code that may be causing the problem.

cwdjrxyz@yahoo.com
Guest
Posts: n/a

 10-16-2005

(E-Mail Removed) wrote:
> The latest Opera displays the table correctly.

There is a screen capture using the latest Opera browser at
http://www.cwdjr.info/temp/table3Opera.jpg . Part of the table is
off-screen at the bottom. I see that I even managed to capture the
cursor . This view looks normal to me, but you know what you wanted.

Dr John Stockton
Guest
Posts: n/a

 10-16-2005
JRS: In article <(E-Mail Removed) .com>
, dated Sat, 15 Oct 2005 22:14:14, seen in news:comp.lang.javascript,
(E-Mail Removed) <(E-Mail Removed)> posted :
>> I cannot easily experiment, as the IE>4 machine is a mile away.
>>
>> What's the explanation, and the suggested fix?

>
>Since I have several browsers installed I checked your mentioned page
>and button on several. My SBC/Yahoo DSL browser(just a modified IE6)
>shows the placement problems you mention. The latest Opera displays the
>table correctly. However the latest Mozilla family browsers(Mozilla,
>Firefox, and Netscape) only give some of the top headings when you
>click the button. The progress bar halts at about 1/2 way, and does not
>move and output the bulk of the table, at least for the 3 minutes I
>waited.

None of the script seems likely to hang the system; the loop structures
are quite simple.

>alert with the message "File include1.js end fault, RSVP!".

Well, you've done the RSVP. That message means that include file
have got a 'top fault').

The only buttons that should take more than a second or so on any PC
less than a decade old are the Timing ones, which have warnings, and the
tests when over a big range of years.

> When you OK
>the alert, the browser goes down. This likely is of little importance
>since the Netscape 4.8 is all but dead in most countries.
>
>Your page is fairly complicated and you use a style considerably
>different from what I use, so I do notnow have time to attempt to
>determine exactly what is going on. I now do nearly all positioning
>with CSS , often using script to calculate the CSS positioning as I did
>in the full year calendar display output for my perpetual calendar. In
>cases that would require a document.write in javascript, I now have to
>do that portion of the code in php on the server,

That means that the page cannot be executed independently of the Net,
which I want to avoid.

> as document.write can
>not be processed in a true html 1.1 page served as
>application/xhtml+xml, which is parsed as XML. A php include at the top
>of the php page converts the code to html 4.01 strict for outmoded
>browsers, such as the IE6, that will not accept the mentioned mime
>type.
>
>Of course, you only mentioned IE browsers, so what your page does on
>other browsers may or may not be of interest to you.

Well, I'd like it to be OK in all, or all after Version 4 level.

The output should look essentially, but not exactly, like that in the
Church of England Book of Common Prayer and in the (British) Calendar
Acts Annexes, and in Halsbury's Laws of England - but reversed left-to-
right. For those without these books (I only have the first), there's a
pure-HTML (non-reversed) version in <URL:

I've now added code for a dot at the beginning of each line, and other
dots where necessary to maintain alignment. If that looks good in IE
5/6, I intend to replace them by   or actual spaces.

.. 28 17 6 25 14
.. 29 18 7 26 15
.. 0 19 8 27 16
----------------
.. 1 20 9 28 17
.. 2 21 10 29 18
.. 3 22 11 0 19

.... ...

I tried saving the generated HTML and using TIDY on it. There is
objection to <pre>...<fieldset> so I've changed it (in Table IIIa) to
<fieldset><pre> which could help. Alas, TIDY now complains about <hr>
in <pre>, but changing to </pre><hr><pre> spreads the layout vertically
- changing <hr> to a blank line is OK. Other Tables also dealt with.

Thanks for looking.

--
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.

cwdjrxyz@yahoo.com
Guest
Posts: n/a

 10-17-2005

Dr John Stockton wrote:

> I tried saving the generated HTML and using TIDY on it. There is
> objection to <pre>...<fieldset> so I've changed it (in Table IIIa) to
> <fieldset><pre> which could help. Alas, TIDY now complains about <hr>
> in <pre>, but changing to </pre><hr><pre> spreads the layout vertically
> - changing <hr> to a blank line is OK. Other Tables also dealt with.

Your revisions have helped on IE6 so that it now seems to display
correctly. However Netscape 4.8 still has the same problem, and the 3
Mozilla family browsers have the same problem, other than there are a
few dots in the few headings for table 3 generated when one version of
very strict compared with IE6, will not tolerate nearly as much older
code as IE6 will, and often will not attempt to correct something as
does IE6. It is beginning to appear that there may be two problems.
Your changes may have fixed the IE problem. However the Mozilla family
problem likely is caused by something quite different.

Randy Webb
Guest
Posts: n/a

 10-17-2005
Dr John Stockton said the following on 10/16/2005 5:24 PM:

> JRS: In article <(E-Mail Removed) .com>
> , dated Sat, 15 Oct 2005 22:14:14, seen in news:comp.lang.javascript,
> (E-Mail Removed) <(E-Mail Removed)> posted :
>
>>>I cannot easily experiment, as the IE>4 machine is a mile away.
>>>
>>>What's the explanation, and the suggested fix?

>>
>>Since I have several browsers installed I checked your mentioned page
>>and button on several. My SBC/Yahoo DSL browser(just a modified IE6)
>>shows the placement problems you mention. The latest Opera displays the
>>table correctly. However the latest Mozilla family browsers(Mozilla,
>>Firefox, and Netscape) only give some of the top headings when you
>>click the button. The progress bar halts at about 1/2 way, and does not
>>move and output the bulk of the table, at least for the 3 minutes I
>>waited.

>
>
> None of the script seems likely to hang the system; the loop structures
> are quite simple.

But it does. In Firefox 1.0.7 the main page
<URL: http://www.merlyn.demon.co.uk/estrdate.htm#T3 >
gives an error in the JS console that
"Tx2 is not defined" line 1362.
Clicking on the "Table III Reversed" button opens a second page that
hangs and the Console reports:
"Prfx is not defined" line 1417.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly

Dr John Stockton
Guest
Posts: n/a

 10-17-2005

Earlier :
>I have a screen capture for you at
>http://www.cwdjr.info/temp/table3.jpg that shows exactly where output
>of table 3 stops on the Firefox browser. Perhaps this will help you
>narrow the portion of the code that may be causing the problem.

That's OK so far as it goes; the next line requires function Prfx which
I think your FireFox failed to get to work. Prfx should have been shown
in a box just above H4 "Page Index to Part of the Prayer Book", higher
in the page. Prfx does have a loop, but it should execute no more than
twice here.

function Prfx(Q, L, c) { var s = Q+"" // ??
// if (!c) var c = ' '
if (c.length>0) while (s.length<L) { s = c+s } ;
return s }

Earlier :
>There is a screen capture using the latest Opera browser at
>http://www.cwdjr.info/temp/table3Opera.jpg . Part of the table is
>off-screen at the bottom. I see that I even managed to capture the
>cursor . This view looks normal to me, but you know what you wanted.

That's just as it should be. Lower down, the line that starts 24 13
should have a step down near the middle, and the last line of data
should be
18 25 14 3 22 11 0 19 8 27 16 5 24 13 2 21 10 29 18 7 C Apr 18

JRS: In article <(E-Mail Removed) .com>
, dated Sun, 16 Oct 2005 17:13:51, seen in news:comp.lang.javascript,
(E-Mail Removed) <(E-Mail Removed)> posted :
>
>Dr John Stockton wrote:
>
>> I tried saving the generated HTML and using TIDY on it. There is
>> objection to <pre>...<fieldset> so I've changed it (in Table IIIa) to
>> <fieldset><pre> which could help. Alas, TIDY now complains about <hr>
>> in <pre>, but changing to </pre><hr><pre> spreads the layout vertically
>> - changing <hr> to a blank line is OK. Other Tables also dealt with.

>
>Your revisions have helped on IE6 so that it now seems to display
>correctly. However Netscape 4.8 still has the same problem, and the 3
>Mozilla family browsers have the same problem, other than there are a
>few dots in the few headings for table 3 generated when one version of
>very strict compared with IE6, will not tolerate nearly as much older
>code as IE6 will, and often will not attempt to correct something as
>does IE6. It is beginning to appear that there may be two problems.
>Your changes may have fixed the IE problem. However the Mozilla family
>problem likely is caused by something quite different.

That will call for testing modifications in Mozilla.

<FAQENTRY> It would be useful to have a list of the names of the browser
families, and their salient members in each case.

--
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
The Big-8 newsgroup management is attempting to legitimise its questionable
practices while retaining its elitist hegemony. Read <URL:news:news.groups>.

Dr John Stockton
Guest
Posts: n/a

 10-17-2005
JRS: In article <(E-Mail Removed)>, dated
Sun, 16 Oct 2005 23:56:18, seen in news:comp.lang.javascript, Randy Webb
<(E-Mail Removed)> posted :
>Dr John Stockton said the following on 10/16/2005 5:24 PM:

>> None of the script seems likely to hang the system; the loop structures
>> are quite simple.

>
>But it does. In Firefox 1.0.7 the main page
><URL: http://www.merlyn.demon.co.uk/estrdate.htm#T3 >
>gives an error in the JS console that
>"Tx2 is not defined" line 1362.
>Clicking on the "Table III Reversed" button opens a second page that
>hangs and the Console reports:
>"Prfx is not defined" line 1417.

Giving an error message is not hanging the system.

Tx2 is the textarea in the Table II section. Its only use is - well,
should be - shown in the bottom like of the box immediately above H5
"Computing Table III". That line was
Tx2.value = St }
and now is
document.getElementById("Tx2").value = St }
which might help.

Prfx is from an include file; if it had not been defined, that should
have become apparent earlier, judging from IE.

If IE opens a new page or window, functions provided to the old page by
include files still work. Is that not the case in FireFox?

--
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.

cwdjrxyz@yahoo.com
Guest
Posts: n/a

 10-18-2005

Dr John Stockton wrote:

> Tx2 is the textarea in the Table II section. Its only use is - well,
> should be - shown in the bottom like of the box immediately above H5
> "Computing Table III". That line was
> Tx2.value = St }
> and now is
> document.getElementById("Tx2").value = St }
> which might help.
>
>
> Prfx is from an include file; if it had not been defined, that should
> have become apparent earlier, judging from IE.
>
> If IE opens a new page or window, functions provided to the old page by
> include files still work. Is that not the case in FireFox?

Netscape 4.8 does the same as I reported earlier. The most recent
version of Netscape has a loading indicator that moves an arrow in a
circle as long as the page is still loading. After you click on the
button for table 3, the first few items of the heading appear. However,