473,657 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.onscrol l...)
document.all.To olbar.style.pix elTop = document.body.s crollTop;
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.dt d">

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...pix elTop = document.body.s crollTop" to work?


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

--
-C. Moya
www.cmoya.com
"CMM" <cm*@nospam.com > wrote in message
news:uz******** ******@tk2msftn gp13.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.onscrol l...)
document.all.To olbar.style.pix elTop = document.body.s crollTop;
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.dt d">

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...pix elTop = document.body.s crollTop" 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.onscrol l...)
document.all.To olbar.style.pix elTop = document.body.s crollTop;
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.dt d">

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...pix elTop = document.body.s crollTop" to work?


--
-C. Moya
www.cmoya.com

Mar 31 '06 #3
use

var doc = document.docume ntElement ? document.docume ntElement :
document.body;
....Toolbar.sty le.pixelTop = doc.scrollTop

if you're worried about backward compatibility.

document.all is likewise deprecated, so use the equivalent
var Toolbar = document.getEle mentById?
document.getEle mentById("toolb arId") :
document.all.To olbar;

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*@discussion s.microsoft.com > wrote in message
news:19******** *************** ***********@mic rosoft.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.onscrol l...)
document.all.To olbar.style.pix elTop = document.body.s crollTop;
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.dt d">

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...pix elTop = document.body.s crollTop" 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
10759
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 Internet Explorer (in Safari, Firefox, and other Mozilla-types), the box ends up overlapping with the second and third rows of the text (which are in an ordered list with some 'display: table-cell' formats defined in order to allow specific...
10
4643
by: NoSpan | last post by:
I have this page that has layout like the following: (no frameset) ---------------------------------------- | header | |--------------------------------------| | div1 | div2 | | | | |-------------------| | | div3 | | | | |
4
17033
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 attempt to write the line to reference the panel control, I get a Null error or an Object does not exist error. I know this can be done in asp.net, but I need the event to fire at the client, otherwise the page will print before firing the...
0
1165
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" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>JINSA Report #576 - Stop and Think</title> <style type="text/css"> body {
4
2928
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 have a table which should fill between the two floating DIVs if there is space. If there's not space, it should push down and display as a separately centered table. IE (7) behaves as I would expect, but FF seems to overlay the right side of the...
5
2318
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 main content area on the right is floating right and stays fine. The weird part is that a refresh will always correct this problem. and the problem will not occur on all the pages though they have identical set-ups. The site is at...
2
1709
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 Language="C#" AutoEventWireup="true" CodeFile="RadiobtnlistPanel.aspx.cs" Inherits="RadiobtnlistPanel" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
1323
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. The form updates the database from which the gridview pulls data. The panel and gridview works if I do a postback from within the gridview such as sorting. but I can not get it to work from the
4
8399
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 onactivetabindexchanged we have called a method loadtabpanel() which is defined in javascript in same page.the problem is it sometime give the message load tab panel undefined. this error does not come regularly. it comes in usercontrol rendering . i...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.