I'm trying to achieve the following:
On a page I have a series of radeditor controls that will load the last saved data. I have a Save button that I do not want to be enabled until the user begins typing or makes a change of some kind into any of the radeditors. I tried the advice on http://www.telerik.com/help/aspnet-ajax/editor-attacheventhandler.html to attach a handler to the "onkeydown" event but it does not seem to be firing at all. "Onclick" works, but not "onkeydown".
Here is what I have in a demo page:
Any help to achieve my scenario is appreciated!
Thanks,
-Scott
On a page I have a series of radeditor controls that will load the last saved data. I have a Save button that I do not want to be enabled until the user begins typing or makes a change of some kind into any of the radeditors. I tried the advice on http://www.telerik.com/help/aspnet-ajax/editor-attacheventhandler.html to attach a handler to the "onkeydown" event but it does not seem to be firing at all. "Onclick" works, but not "onkeydown".
Here is what I have in a demo page:
<
div
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function OnClientLoad(editor, args) {
var element = document.all ? editor.get_document().body : editor.get_document();
$telerik.addExternalHandler(element, "onkeypress", function (e) {
$('#<%=btnSave.ClientID %>').text = "Save";
$('#<%=btnSave.ClientID %>').disabled = false;
});
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadEditor
runat
=
"server"
ID
=
"reText"
Height
=
"400px"
Width
=
"100%"
EditModes
=
"Design"
Skin
=
"WebBlue"
DialogHandlerUrl
=
"~/Telerik.Web.UI.DialogHandler.axd"
StripFormattingOnPaste
=
"MSWordRemoveAll"
StripFormattingOptions
=
"MSWordRemoveAll"
AjaxUrl
=
"~/Telerik.Web.UI.SpellCheckHandler.axd"
EnableResize
=
"false"
OnClientLoad
=
"OnClientLoad"
>
</
telerik:RadEditor
>
<
telerik:RadButton
ID
=
"btnSave"
runat
=
"server"
Text
=
"Current"
Enabled
=
"false"
/>
</
div
>
Any help to achieve my scenario is appreciated!
Thanks,
-Scott