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

Home Posts Topics Members FAQ

repositioning panel inside page

when i scroll up and down a page i want the panel inside to move as well
so that it doesnt disppear when scrolling the page:

now i have this javascript code, that does that, but it's not so smooth:

prevScroll = 0;

function scroll(){

var displayFrame = document.all("i frmDisplay");
amountToScroll = window.document .body.scrollTop - prevScroll;
document.getEle mentById("pnlCo ntrolsContainer ").style.to p =
parseInt(docume nt.getElementBy Id("pnlControls Container").sty le.top) +
parseInt(amount ToScroll);
document.getEle mentById("imgSh opLogo").style. top =
;//parseInt(docume nt.getElementBy Id("imgShopLogo ").style.to p) +
parseInt(amount ToScroll);
prevScroll = window.document .body.scrollTop ;
}

now from the code, the panel's id is pnlControlsCont ainer, and im
changing the top attribute of the panel so i can make that panel move
with page scroll when the eventhandler (scroll()) is called. But it
doesnt produce smooth results as the top of the panel looks stammer or
it keeps bouncing up and down like when im scrolling the page.

if you guys know of a smoother result, i will appreciate it.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 879

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

Similar topics

3
10839
by: Fabrizio | last post by:
Hi, There is any chance to insert a control like a text box in a panel choosing the absolute position? When I try to insert a label , the panel positions the control on a locked position. Thanks Fabrizio
2
3615
by: Don Wash | last post by:
Hi There! I'm creating my website with ASP.NET + XHTML, which means I will strictly adhere the XHTML standards for my web page output. I use Panel or PlaceHolder WebControls to place dynamically created <div></div> contents to my web pages. But the problem arises when because Panel and PlaceHolder WebControls do extra work with <span> tags as follows...
3
1563
by: Pavan | last post by:
Hi All, I am having a wierd problem while displaying my panel. My code is something like this <table> <tr> <td width=100>label</td> <td width=100>label</td> <td width=100>label</td> <td width=100>button in this cell</td>
3
1810
by: George | last post by:
In my Webform I am building in VS.NET, I need to position and reposition a number of panels at runtime from within my Code Behind. Can someone tell me what namespaces I need to import, what the code is, and where, exactly I put that code. In addtion to the... <%@ Page Language="vb" (etc, etc.) %> ....at the very top of my HTML source, I also have...
2
1926
by: tjfdownsouth | last post by:
I am using a panel inside an asp.net 2.0 page so that I can have the scrolling capabilities. Inside the panel I have a datagrid that I would like to stay within a certain area. On the initial page load the panel works as expected but when I load the datagrid the panel expands off the side of the page to accomidate the new grid size. Does anyone know how to prevent this without using an absolute size. The panel basically takes up the...
4
6868
by: tshad | last post by:
I am trying to hide and show certain parts of my code (which I have no problem doing with DW). In VS 2003, it won't let you use <div runat="server"to section of parts of my code in a table. This is during compilation (build). My code is: <TABLE id="Table1" style="WIDTH: 864px; HEIGHT: 177px" cellSpacing="1" cellPadding="1" width="864" border="0">
4
15531
by: =?Utf-8?B?Rmx5Z3V5?= | last post by:
How can I update the html inside of a panel? How can I make this code work <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server">
1
4846
by: mbruyns | last post by:
i have been trying (and sometimes succeeding) to use the modalpopupextender to show various panels of controls on my asp pages. the strange problem that i keep on running into is that sometimes it works, displaying an awesome popup, while other times, it doesn't show a popup at all, but rather just page posts back and the panel becomes visible at the bottom of the page (where it is situated in the designer). what is even stranger to me is that...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
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
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7347
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
6175
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
4171
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...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.