473,414 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 1274
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Olly | last post by:
I've found a basic script, however I also need to add alt and title attributes as well, how would I go about doing this? Here's the script I found: Thanks <script language="JavaScript"> <!--...
4
by: Hal | last post by:
Can someone please tell me what is wrong with this script? <script language="JavaScript"> <!-- function HF_CloseAllChildren() { if (g_win1) != undefined { if ((g_win1) && !(g_win1.closed))...
6
by: S P Arif Sahari Wibowo | last post by:
Hi! I am thinking to have a client-side script doing processing on file downloading, basically the script will process a downloaded file from the server before it received by the user. For...
7
by: news frontiernet.net | last post by:
I have a project that uses mouse-over JS script to show and hide layers that works well in MSIE 6.0 and Opera. But, it does not work in NS nor Mozilla. It is here: ...
38
by: | last post by:
I have a script... ----- <SCRIPT language="JavaScript" type="text/javascript"> <!-- function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this = makeArray.arguments; } ...
28
by: Randy Starkey | last post by:
Hi, Does anyone know where I can get a script that show a little plus sign after a line of text, that when you click the plus sign, more text is revealed on that same page, like a continuing...
15
by: remi | last post by:
Hi, I would like to write a script that will load a js file according to the browser used. Here is the suggested code : **** function detectBrowser() { var browser=navigator.appName;
5
by: IndependentDreams | last post by:
This is a java script code that will make it snow on your page. My problem is that it works just fine in IE and Opera, but doesn't work in Fire Fox or Safari. Here is the code. If you have any idea...
5
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
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...
0
isladogs
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.