473,397 Members | 2,099 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,397 software developers and data experts.

set absolute position on panel

How can the absolute position be set when a button is hit. I have a help
pannel that i want to appear next to the "?" button that is selected.

thanks
any ideas would be appreciated
kes
Nov 19 '05 #1
1 2183
set
obj.style.top = x;
obj.style.left = y;

to find the x and y of an object:
window.getYPos = function(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}
window.getXPos = function(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"Kurt Schroeder" <Ku***********@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.com...
How can the absolute position be set when a button is hit. I have a help
pannel that i want to appear next to the "?" button that is selected.

thanks
any ideas would be appreciated
kes

Nov 19 '05 #2

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

Similar topics

4
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so...
7
by: Alex | last post by:
Hi Everone, I need some advice on how to setup 4 columns where the outside two are absolute (120px) and the inner two (side by side) are relevent (Fluid) and change with the screen. Here's my...
0
by: John A Grandy | last post by:
for asp.net web-forms meant to be printed : apparently, a style="POSITION: ABSOLUTE" panel (asp.net renders this as an html div element) *following* a page-break does not absolutely position the...
3
by: horusprim | last post by:
Is there a CSS absolute positioning rendering bug in FF1.02 and IE 6? I have been experimenting with precision absolute positioning in CSS. The following test content was used in the...
6
by: ThunderMusic | last post by:
Hi, I think the subject says it all... thanks ThunderMusic
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
1
by: canteloup | last post by:
Hi, I need to find a way to determinate where a control is on a windows form or panel control. I have a panel contro setted with autoscroll = true and when I move a control contained by it, I need to...
0
by: canteloup | last post by:
Hi, I need to find a way to determinate where a control is on a windows form or panel control. I have a panel contro setted with autoscroll = true and when I move a control contained by it, I need to...
7
by: chemlight | last post by:
I am having an issue with HTML elements not printing when positioned absolutely when they extend beyond the first page. I am working on some foreign tax refund forms. The forms are cut into multiple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.