I have a vertical RadMenu on my page who's button clicks bring up popup windows.
We have a little formula that determines the placement of each window (just to the right of the button clicked), but on IE9, the offsetTop value for the menu item element is off by 60, which pushes down our window lower than we want. Other browsers display it fine.
Any ideas why? Here's the menu:
And Javascript:
We have a little formula that determines the placement of each window (just to the right of the button clicked), but on IE9, the offsetTop value for the menu item element is off by 60, which pushes down our window lower than we want. Other browsers display it fine.
Any ideas why? Here's the menu:
<telerik:RadMenu ID=
"RadMenu1"
runat=
"server"
flow=
"Vertical"
Width=
"100%"
OnClientItemClicked=
"MenuOpenWindow('RadWindow1')"
>
<Items>
<telerik:RadMenuItem ImageUrl=
"../Images/button.png"
Value=
"RadWindow1"
/>
</Items>
</telerik:RadMenu>
And Javascript:
function
MenuOpenWindow(windowTitle) {
var
oWindow;
var
offsetElementBounds;
var
menu = $find(
"<%=RadMenu1.ClientID%>"
);
var
menuItem = menu.findItemByValue(windowTitle).get_element();
if
(windowTitle ==
"RadWindow1"
) {
if
(lastWindowTitle !=
"RadWindow1"
) {
oWindow = $find(
"<%=winRadWindow1.ClientID%>"
);
oWindow.show();
if
(oWindow.get_offsetElementID()) {
offsetElementBounds = $telerik.getBounds($get(oWindow.get_offsetElementID()));
var
x = parseInt(offsetElementBounds.x + (menuItem.offsetWidth / 3));
var
y = parseInt(menuItem.offsetTop + offsetElementBounds.y - (menuItem.offsetHeight / 3));
alert(menuItem.offsetTop);
alert(offsetElementBounds.y);
alert(menuItem.offsetHeight);
alert(x);
alert(y);
oWindow.moveTo(x, y);
}
return
false
;
}
}
}