Saturday, March 31, 2012
set absolute position on panel
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
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
Wednesday, March 28, 2012
set default cursor position
<body onLoad='<%= "window.document.forms[0]." + TextBoxID.ClientID +
".focus();" %>'>
OR
<body onLoad='window.document.forms[0].<%= TextBoxID.ClientID %>.focus();'>
"Grey" <erickwyum@.i-cable.com> wrote in message
news:uMeZzwFoEHA.3464@.TK2MSFTNGP14.phx.gbl...
how to set the default cursor position to the one textbox in asp.net
Tuesday, March 13, 2012
Set page scroll position to top of page?
When my web page is reloaded I change what is being displayed in aframe on the page -- it is a long frame -- I would like to set thescroll position to be at the top of the page so that a web form isvisible.
anyone know how this can be done?
THX,
Usually when a web page is reloaded, the default behavior is that the scroll bars get reset to the top position. I would check if SmartNavigation is on. This may be causing the problem.
hope this helps,
sivilian
Hi sivilian, my requirement is to set the sidebar horizontally above the wizard instead of displaying vertically left side of the wizard.
Its possibe? if possible hiow?
thanks in advance.
use javascript
function ResetScroll()
{
window.scrollTo(0,0);
}
on the body tag add onload="ResetScroll()"
Happy Coding