Body hidden, but table borders still visible.

N

NeverLift

I've searched around and don't find the following incident discussed
specifically.

First, a comment from an experience programmer new to JavaScript:

While I am new to javascript, I've programmed in a dozen other
languages for decades, and now have been working in javascript
intensively for several weeks. My first comment -- which has nothing
to do with this problen -- is on how its richness makes it so
difficult to provide adequate reference material. After working only
with what I could discover through Google searches and actually
writing some nifty fast incremental select element populating code --
what I found on the Web, which has been cited in many locations, is
ugly code and sloooow when search a list of, say, 2000 possible
entries for inclusion in the box -- just with those hints.

I finally broke down, bought what the reveiws say are the two most
complete books -- Javascript Bible and Dynamic HTML, The Definitive
Reference (both by Goodman), and am aghast: With the "Bonus Chapters"
in the former, they total more than 3,000 pages! And with their
in-depth indexes, it's still very difficult to find what one needs.
(The HTML and CSS speification publications add another 400 pages . .
..) As a truly elementary example: I wanted to return from a function
as a result of a test, not by running it out: The "return" is not
indexed, nor are any of the words that might lead one to it. In fact,
it is shown in some examples about 980 pages into the book, but
nowhere is it actually documented. Yes, I know, every language has a
"return" statement, but its usage and syntax varies -- and on some
occasions, it's actually called something else.

So, to my current issue. For reasons that are valid -- please don't
ask, "Why do you want to do that?" -- I need to hide the page in its
entirety until the onload script has altered it based on certain
criteria. After doing a lot of brute force stuff -- setting font
color to "white", etc., etc. -- I discovered that one can put the
attribute style="visibility:hidden" directly in the <body> tag --
which itself is not easily discovered. But: Tables in the body that
have a non-zero "border" attribute still show -- just the borders!

Yes, I know I need to learn CSS as well; give me a break, guys! I do
have that spec as an HTML doc, and it was there I finally found this
out. You know, you can't look such things up by concept in the
indexes of either book, or the HTML spec, or the CSS book, unless you
already know the term that implements it; if I know the term, I don't
need to look it up! In any case, try looking up "hidden" in either
book; you get no hint that it can be applied via style to any element.
If you know it's available as a style attribute, then know the
attribute is "visibility", why than you can find it . . . and by that
time, you must know enough that you don't need to find it. (Again, a
Google Groups search on words associated with the concept told me what
terms to use, and then I didn't need to use the book . . .)

I apologize for the rant (Fortran was good enough for my grandfather,
it was good enough for my father, and it's good enough for me -- bah,
humbug!), but it's been a very frustrating couple of weeks.

The real question: What about them table borders? So far, I'm
defining their values as zero, then setting them to their final values
at the same point that I make the body visible. Should I need to do
all that? What should make that unnecessary?
 
R

Richard Cornford

NeverLift wrote:
While I am new to javascript, I've programmed in a dozen other
languages for decades, and now have been working in javascript
intensively for several weeks. ...
I finally broke down, bought what the reveiws say are the two most
complete books -- Javascript Bible and Dynamic HTML, The Definitive
Reference (both by Goodman), and am aghast: With the "Bonus Chapters"
in the former, they total more than 3,000 pages!

I would have thought that for an experienced programmer the ECMAScript
specification (ECMA 262 3rd edition) would be the best source of
information specifically related to javascript as a programming
language.

This newsgroup's FAQ has a (very) short section on books about
javascript:-

<URL: http://jibbering.com/faq/#FAQ3_1 >

- it doesn't list any books by Goodman.

I apologize for the rant (Fortran was good enough for my grandfather,
it was good enough for my father, and it's good enough for me -- bah,
humbug!), but it's been a very frustrating couple of weeks.

In my opinion javascript lends itself very well to browser scripting
because its loose typing and dynamic nature allows it to be flexible in
the face of the diverse environments client-side code encounters. Trying
to script a browser using a rigidly typed language with fixed class
definitions, like Java, would make the task considerably harder than it
currently is. I can't see Fortran being at all suitable.
The real question: What about them table borders? So far, I'm
defining their values as zero, then setting them to their final values
at the same point that I make the body visible. Should I need to do
all that? What should make that unnecessary?

The last time I looked as a script/HTML/CSS where someone was
complaining about not being able to conceal table borders with the CSS
visibility property the cause was a bogus CSS property in an associated
STYLE element (An unexpected interaction as CSS is supposed to ignore
properties that it does not understand) and it only happened in one
browser (IE).

But without seeing code nobody is going to be able to do any more than
guess as to a possible cause. I would recommend that you create a short
test page that demonstrates the problem in isolation and post it (though
if you are not actually setting the visibility property with javascript
then it is probably actually a CSS question -
comp.inforsystems.www.authoring.stylesheets ).

Richard.
 
J

Juliette

Juliette was on 29-05-2004 inspired enough to write :
I've searched around and don't find the following incident discussed
specifically.

First, a comment from an experience programmer new to JavaScript:
**snip**

So, to my current issue. For reasons that are valid -- please don't
ask, "Why do you want to do that?" -- I need to hide the page in its
entirety until the onload script has altered it based on certain
criteria. After doing a lot of brute force stuff -- setting font
color to "white", etc., etc. -- I discovered that one can put the
attribute style="visibility:hidden" directly in the <body> tag --
which itself is not easily discovered. But: Tables in the body that
have a non-zero "border" attribute still show -- just the borders!
**snip**

The real question: What about them table borders? So far, I'm
defining their values as zero, then setting them to their final values
at the same point that I make the body visible. Should I need to do
all that? What should make that unnecessary?

Ignoring the rant, this is more of a CSS question than anything else.
I suggest you try using:
BODY { display: none; }
or alternatively (if that table you are using is a layout table):
#IDOFTABLE {display: none; }

Good luck, Juliette
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen
in news:comp.lang.javascript said:
After working only
with what I could discover through Google searches
...
I finally broke down, bought what the reveiws say are the two most
complete books -- Javascript Bible and Dynamic HTML, The Definitive
Reference (both by Goodman), and am aghast:

With all that Googling, you should have found and read our FAQ. Section
3.1 is quite explicit.

Edition 1 of the Pocket Flanagan has "return", just where and as it
should be. Admittedly it is not indexed; but there is no index in the
Pocket. I presume, therefore, that "return" can readily be found in the
full Flanagan. The present edition is the 4th; the 3rd was 790 pages.

Yes, I know, every language has a
"return" statement, but its usage and syntax varies -- and on some
occasions, it's actually called something else.

Not so; Pascal and Delphi functions do not use one. It is necessary to
assign to the name of the function, /alias/ Result; but that does not
exit.
 
G

Gary Marquart

Well, to pick at nits . . . I used quotes around the "return" to
indicate that it may be a different word in other languages, but that
all (that I know about) have some statement that exits a subprogram.
Paying over 50 bucks for a book with 1,600 pages and 90 pages in its
index that does not cite the concept in that index . . . arrgh!

Curiously, in my first language (after Assembler), Fortran (now you can
figure my age -- when it was an IBM invention and had no numbers after
the word, and McCracken was The Authority -- I taught it at Purdue
using his book), the return statement exits from the subprogram but, if
that is a function, you must have separately set the function name to
the returned value.

But thanks to all who recommended solutions, and apologies for the
multiple postings. I was accessing this through the Google Groups
search, didn't know the URL to get to it directly -- and I only posted
two messages, the first of which it couldn't find two days later which
is why I submitted the second version; the rest are Google's doing. I
know better now . . .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top