Hi,
I am using a radwindow with modal background. I have a requirement to make the window float when the page is scrolled. I referred the scripts from this link,
http://www.telerik.com/community/code-library/aspnet-ajax/window/floating-r-a-d-window-on-page-scroll-window-stays-visible-during-scrolling.aspx
Find below the style and scripts,
But the script is not working only in IE 6. This problem is because of the css property position : fixed. But when i tried removing, the scripts are not working. Please help with the code changes to make it work on all browsers including IE 6 mainly.
Regards,
Saravanan K
I am using a radwindow with modal background. I have a requirement to make the window float when the page is scrolled. I referred the scripts from this link,
http://www.telerik.com/community/code-library/aspnet-ajax/window/floating-r-a-d-window-on-page-scroll-window-stays-visible-during-scrolling.aspx
Find below the style and scripts,
<head runat="server"> |
<title>Untitled Page</title> |
<style type="text/css"> |
html, body, form |
{ |
padding: 0px; |
margin: 0px; |
height: 100%; |
width: 100%; |
} |
.RadWindow |
{ |
position: fixed !important; |
} |
</style> |
</head> |
<script type="text/javascript"> |
function GetSelectedWindow() |
{ |
var oManager = GetRadWindowManager(); |
return oManager.getActiveWindow(); |
} |
function PositionWindow () |
{ |
var oWindow = GetSelectedWindow(); |
if (!oWindow) { |
return; |
} |
var Y = document.body.clientHeight + |
document.body.scrollTop - |
oWindow.get_height(); |
var X = document.body.clientWidth + |
document.body.scrollLeft - |
oWindow.get_width(); |
Y = (Y > 0) ? Y : 0; |
X = (X > 0) ? X : 0; |
oWindow.moveTo(X, Y); |
} |
function InitWindow () |
{ |
setTimeout(function() |
{ |
var oWindow = GetRadWindowManager().getActiveWindow(); |
if (!oWindow) |
{ |
window.setTimeout('InitWindow()', 500); |
} |
PositionWindow();}, 0); |
} |
But the script is not working only in IE 6. This problem is because of the css property position : fixed. But when i tried removing, the scripts are not working. Please help with the code changes to make it work on all browsers including IE 6 mainly.
Regards,
Saravanan K