Closed Thread Icon

Topic awaiting preservation: onload is fired before table.div is loaded? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8359" title="Pages that link to Topic awaiting preservation: onload is fired before table.div is loaded? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: onload is fired before table.div is loaded? <span class="small">(Page 1 of 1)</span>\

 
Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-21-2002 12:02

Hmz, weird stuff going on over here. ..

I want to get the offsetHeight and offsetWidth of the content of a window, after it is being loaded.
(I don't know if it's worth mentioning, but the window is being created through window.open)
To do so I've placed a DIV inside of the window, of which I'm getting the offsetWidth and offsetHeight on body.onload. But I've got a div nested inside a table which is in turn nested inside the content-div. This probably sounds confusing, but the construction is as follows: DIV.TABLE.DIV
The content inside of the inner DIV isn't being calculated when the onload-event is fired.
And on top of that, it is initially drawn at the wrong place.
It's not until after the onload that the content is being shown correctly. That is probably why the onload-function excludes it when calculating the offsetWidth and offsetHeight the outer DIV.

See http://www.codewarrior.nl/~bladibla/trouble/ for a more straightforward example. Any help would be welcome. Thanx in advance.



[This message has been edited by Nevel (edited 10-21-2002).]

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-21-2002 13:22

Ok, turns out I was being stupid (duh ).
I was using position:absolute for divs which were supposed to be at exactly the same place, and which were nested inside of a table.
But I needed to use position:relative to get the offsetHeight of the init div...

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-21-2002 16:50

By the way, my buggy script *does* accidently solve the "form-objects z-index"-issue
I know I don't have any reason to be proud of that, but I can't help it

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-21-2002 17:21

It does? Where are the form elements?

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-21-2002 17:35

You're right, the current page hasn't got any form-elements. But I can easily reconstruct the situation, though I'm afraid it'll have to wait 'till tonight. It's all got to do with the combination of position:relative and position:absolute. As you'll see tomorrow

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-21-2002 17:45

Yes, do that...

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-22-2002 10:52

Hmz,

I actually did reconstruct the situation, and in order to find the precize solution I kept minimizing my html-file. But have I gone nuts or isn't there any problem with forms anymore? The problem did existed inside my head alright, but this file works in explorer6+ and netscape7, and also in ns4 and opera??

I ain't doing anything special, just throwing in 2 divs, of which the form hasn't even got to be inside of a div.
Aw, I feel like that guy in American psycho who thought he killed tons of people, but found out he probably didn't :s
Anyway, the file's over here: http://www.codewarrior.nl/~bladibla/overruleForm/

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-22-2002 12:21

Have you tried that without using in-line styles?

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-22-2002 14:01

I have now: http://www.codewarrior.nl/~bladibla/overruleForm/overFormExtCss.htm
So you tell me if I'm a fruitcake...

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-22-2002 15:23

Try it with a dropdown menu.

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 10-22-2002 21:41
quote:
Try it with a dropdown menu.


Yea, do that. I don't think that it'll work.

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-22-2002 21:48

Aaaah, so THAT was were the bug was hiding
I'm Glad I wasn't going nuts, but it's a shame it doesn't work yet :s
Thanx for pointing it out, Slime.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-23-2002 01:27

Ah, too bad...

« BackwardsOnwards »

Show Forum Drop Down Menu