Showing posts with label panel. Show all posts
Showing posts with label panel. Show all posts

Saturday, March 31, 2012

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
kesset
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" <KurtSchroeder@.discussions.microsoft.com> wrote in message
news:522009E3-7335-4B58-A4E9-28F9C49281E1@.microsoft.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

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
kesset
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" <KurtSchroeder@.discussions.microsoft.com> wrote in message
news:522009E3-7335-4B58-A4E9-28F9C49281E1@.microsoft.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