I am having an issue with a custom "help" button that I added to the Radwindow. When I click on my custom button, the window maximizes. And when I click on the custom button again, nothing happens. I am NOT expecting the window size to change. Does anyone know what is going on?
Telerik.Web.UI V: 2009.2.701.20
Using IE8 in Browser mode: IE8 Document mode: IE 8 Standards
Is there some embedded event that I need to cancel?
Telerik.Web.UI V: 2009.2.701.20
Using IE8 in Browser mode: IE8 Document mode: IE 8 Standards
Is there some embedded event that I need to cancel?
function
showRadWindow() {
window.radopen(
"SamplePage.aspx"
,
"sampleWindow"
);
return
false
;
}
function
AddHelpIcon(radWindow) {
var
radWindowDom = document.getElementById(radWindow.get_id());
var
TitleBar = radWindow.GetTitlebar();
var
parent = TitleBar.parentNode;
var
oUL = parent.getElementsByTagName(
'UL'
);
var
oLI = oUL[0].getElementsByTagName(
'LI'
);
//Get the unordered list html element
if
(oLI[0].id !=
"HelpListItem"
) {
//If first (list item) does not have the id of "HelpListItem"
var
newLI = oLI[0].cloneNode(
true
);
var
newA = newLI.getElementsByTagName(
'a'
);
//html anchor
oUL[0].style.width =
"93px"
;
//width of titlebar
newA[0].className =
"helpbutton"
;
//class inside .css file
newA[0].title =
"Help Button"
;
newA[0].lastChild.innerHTML =
"Help Button"
;
newA[0].onmousedown = callHelpFunction;
if
(radWindowDom.attributes[
"HelpId"
] !=
null
) {
newA[0].setAttribute(
"helpId"
, radWindowDom.attributes[
"HelpId"
].value);
}
oUL[0].insertBefore(newLI, oLI[0]);
oLI[0].id =
"HelpListItem"
;
//Name the first (list item) ID to "HelpListItem"
}
}
function
callHelpFunction(e) {
//Do something
//Cancel event!
if
(!e) e = window.event;
return
$telerik.cancelRawEvent(e);
}
<asp:Button Id=
"button1"
runat=
"server"
Text=
"Open Rad Window2"
OnClientClick=
"showRadWindow(); return false;"
/>
<telerik:RadWindowManager id=
"radWindowManager"
runat=
"server"
>
<windows>
<telerik:RadWindow
id=
"notesWindow"
Runat=
"server"
Behaviors=
"Close, Move, Resize, Maximize"
ReloadOnShow=
"true"
VisibleStatusbar=
"true"
ShowContentDuringLoad=
"false"
Width=
"440px"
Height=
"440px"
Left=
"250px"
Modal=
"true"
EnableEmbeddedSkins=
"false"
Skin=
"mySkin"
EnableEmbeddedBasestylesheet=
"false"
OnClientShow=
"AddHelpIcon"
>
</telerik:RadWindow>
</windows>
</telerik:RadWindowManager>