Sonnich Jensen wrote:
> Not sure whether it is the right solution, but this is what I cam up
> with.
For what problem?
> A header and an image for waiting...
> <img src="bigrotation2.gif" name="load1">
The required `alt' attribute is missing.
http://validator.w3.org/
> then, when loaded, it should set the height to 0, or something.
Why?
> But
> <body onload="load1.height=0;">
> does not work - though executed (tested with an alert as first thing)
As it should. You are assuming that because the MSHTML DOM makes element
object references available as properties of a host object in the scope
chain, it is so in all UAs. It isn't.
document.images["load1"].height = 0;
may work.
> And trying this
> </table><p>
> <script language="JavaScript" type="text/JavaScript"><!--
Omit the deprecated `language' attribute and the error-prone pseudo-comment
declaration. A `p' element also should not contain a `script' element
because if script support is absent, the paragraph spacing is displayed anyway.
> load1.height=0;
> --></script>
The closing pseudo-comment is a syntax error. Remove it.
> when the table has loaded, did not work -
http://www.jibbering.com/faq/faq_not...ml#ps1DontWork
> the script (again tested with an alert) is excuted _before_ the table
> is loaded.
Unlikely. It may be executed before the table is fully rendered.
> Not sure how that is possible, as the code is not even sent to the
> user yet. (why?)
Have you removed the `onload' attribute from the `body' element before
testing the second approach?
> I usually work in PHP.
That is irrelevant, as you generate (X)HTML.
> Basically, I want to set the height to 0 once loaded. Any ideas?
HTH
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee