473,322 Members | 1,345 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,322 software developers and data experts.

Floating Panel/Div's and Doctype

CMM
Has any one gotten a "stay-in-view" floating div to work in ASP.NET 2.0?
For those that don't know, the classic way is this (for IE anyway):
(window.onscroll...)
document.all.Toolbar.style.pixelTop = document.body.scrollTop;
But, this doesn't seem to work in any way with ASP.NET 2.0. The problem
seems to lay in ASP.NET 2.0's default doctype...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I'd like to keep using this doctype because it helps with rendering tables
consistently across browsers.... anyone know of a way to get
"onscroll...pixelTop = document.body.scrollTop" to work?


--
-C. Moya
www.cmoya.com
Mar 31 '06 #1
4 3310
CMM
Found the answer to my own question (after many hours).
Instead of using document.body.scrollTop...
W3C standards call for document.documentElement.scrollTop
I wonder how IE 5.5 reacts to this?

--
-C. Moya
www.cmoya.com
"CMM" <cm*@nospam.com> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
Has any one gotten a "stay-in-view" floating div to work in ASP.NET 2.0?
For those that don't know, the classic way is this (for IE anyway):
(window.onscroll...)
document.all.Toolbar.style.pixelTop = document.body.scrollTop;
But, this doesn't seem to work in any way with ASP.NET 2.0. The problem
seems to lay in ASP.NET 2.0's default doctype...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I'd like to keep using this doctype because it helps with rendering tables
consistently across browsers.... anyone know of a way to get
"onscroll...pixelTop = document.body.scrollTop" to work?


--
-C. Moya
www.cmoya.com

Mar 31 '06 #2
DWS
Classic was a percentage top value.
Use a frame they render so much nicer.
"CMM" wrote:
Has any one gotten a "stay-in-view" floating div to work in ASP.NET 2.0?
For those that don't know, the classic way is this (for IE anyway):
(window.onscroll...)
document.all.Toolbar.style.pixelTop = document.body.scrollTop;
But, this doesn't seem to work in any way with ASP.NET 2.0. The problem
seems to lay in ASP.NET 2.0's default doctype...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I'd like to keep using this doctype because it helps with rendering tables
consistently across browsers.... anyone know of a way to get
"onscroll...pixelTop = document.body.scrollTop" to work?


--
-C. Moya
www.cmoya.com

Mar 31 '06 #3
use

var doc = document.documentElement ? document.documentElement :
document.body;
....Toolbar.style.pixelTop = doc.scrollTop

if you're worried about backward compatibility.

document.all is likewise deprecated, so use the equivalent
var Toolbar = document.getElementById?
document.getElementById("toolbarId") :
document.all.Toolbar;

Mar 31 '06 #4
CMM
Frames are a hassle. The toolbar needs easy access to and interact with the
elements on the page. I experimenting with all sorts of combinations using
scrollable div regions but could never get the placement quite right so that
TopPanel took up the top n-pixels and BodyPanel took up the entire rest of
the page without spilling past the viewable region and triggering the
browser's own scrollbars. I know this is a classic problem and there are all
sorts of JavaScripts to adjust div positions on window.onresize and
window.scroll. It's a big mess.

I've seen the Coalesys PanelSet control....but I'm not paying hundreds of
dollars for something that I feel should be easily accomplished in ASP.NET
proper (well, the sizable-splitter in PanelSet is cool... maybe that's worth
it.... but I don't need a splitter, I just need dockable-esque panels).

--
-C. Moya
www.cmoya.com
"DWS" <DW*@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Classic was a percentage top value.
Use a frame they render so much nicer.
"CMM" wrote:
Has any one gotten a "stay-in-view" floating div to work in ASP.NET 2.0?
For those that don't know, the classic way is this (for IE anyway):
(window.onscroll...)
document.all.Toolbar.style.pixelTop = document.body.scrollTop;
But, this doesn't seem to work in any way with ASP.NET 2.0. The problem
seems to lay in ASP.NET 2.0's default doctype...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I'd like to keep using this doctype because it helps with rendering
tables
consistently across browsers.... anyone know of a way to get
"onscroll...pixelTop = document.body.scrollTop" to work?


--
-C. Moya
www.cmoya.com

Mar 31 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JHR | last post by:
Hey all, I'm trying to make a sidebar box float to the right of various items, and for those items to wrap if a user shrinks his browser window. Instead, in every browser I've tried except for...
10
by: NoSpan | last post by:
I have this page that has layout like the following: (no frameset) ---------------------------------------- | header | |--------------------------------------| | ...
4
by: James | last post by:
Hello group: I'm trying to hide a panel control in javascript when a print button is clicked. On my web form, I have a button that fires a javascript function called doPrint(). No matter how I...
0
by: jstathan | last post by:
Starting off, here's the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"...
4
by: tbirnseth | last post by:
I'm having trouble between IE and FF. For once, IE behaves as I would expect, but FF doesn't. Basically I have a container with two floating DIVs in it. One floats left and the other right. I then...
5
by: jemcgui | last post by:
I've been building a site that has a quirk in it. It will display just as intended in IE but not firefox. The left "nav" div which is floating left will be forced down to the bottom of the page. The...
2
by: hsegoy1979 | last post by:
Dear All Iam new to asp.net. I want to display a panel between two radio buttonlist listitems. I have wriiten in comments in code to display panel position. Here is my code <%@ Page...
0
by: AdonisL81 | last post by:
Hello, I am new to .NET I am having trouble with a asp update panel and Gridview. The Gridview control is inside the update panel and I am trying to have the gridview update from a form button....
4
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.