Previous Message
Next Message

[css-d] DHTML - Problems with scripted positioning attributes

Sent by Ben Henick on 25 January 2002 15:03


Apologies to those who've already seen a similar message I posted on
thelist@evolt earlier this week...

As some of you may know, I've been test-driving a script that performs
inline pagination, in the style of iht.com (but without the columns).
John Weir and I have corresponded, and have at least confirmed that we're
running into the same probems on IE5/Mac (which are many in number).

The page in question is at

http://www.io.com/persist1/log.php
[script URL at the bottom of this message]

and I've been informed of two layout issues:  one in Mozilla 0.9.7, one in
IE6.

There is an inline nav that's built once, and re-written every time a new
"page" is rendered, that looks something like this code-wise:

// check to see if it already exists; else

Note1 = document.createElement("DIV");

// always:

Note1.style.position.top = // value derived from document.body.clientHeight

// other positioning and styles follow, same reference

document.getElementsByTagName("BODY").appendChild(Note1);

Now, what this is *supposed* to do is place an inline navigation panel
(prev|next, etc.) at the bottom of the page.

In IE6, my understanding is that it doesn't always work that way;
sometimes body.clientHeight is calculated incorrectly such that the
inline nav appears well above the foot of the browser canvas.

Christina Wodtke found that one, which I thought might be due to a window
resize.  So I wrote a script that handles window resizes, and the only
feedback I've gotten since is that

1.  IE6 kicks a$$, generally
2.  The inline pagination DOES work in IE6

A confirmation of these facts would be grand.

Mozilla 0.9.7 ignores the positioning statements completely (from what
I've been told and shown - I'd like to avoid downloading the browser to
get to the bottom of it).

It occurs to me that - since the inline nav is intended to be a persistent
object - there'd be nothing wrong with putting the styling and positioning
into a stylesheet and referring to 'document.getElementById("InlineNav")'
instead of 'Note1' - provided I write Note1.attributes.id = "InlineNav" of
course.

Question is, will Mozilla 0.9.7 properly position the called-for element
properly, if I refer to it in that fashion instead?

For those of you who want to see the JavaScript in all of its (ahem)
glory, that's at

http://www.io.com/persist1/scripts/presentation.js

This script is nowhere near to being ready for any sort of release (I do
intend to GPL it when I'm ready) - in fact, it's suffering from serious
elephantitis.

Any and all comments/criticisms/suggestions are welcome.


TIA
-- 
Ben Henick
Web Author At-Large              Managing Editor
http://www.io.com/persist1/      http://www.digital-web.com/
[EMAIL-REMOVED]                  [EMAIL-REMOVED]
--
"Are you pondering what I'm pondering, Pinky?"
"I think so, Brain, but... (snort) no, no, it's too stupid."
"We will disguise ourselves as a cow."
"Oh!" (giggles) "That was it exactly!"
Previous Message
Next Message