This is a migrated thread and some comments may be shown as answers.

[Solved] OnTextChanged

1 Answer 126 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mac
Top achievements
Rank 2
Mac asked on 30 Apr 2008, 11:40 AM

Hi,

I want to have a ajax postback raised when the contents of an editor control changes.

I have set up the OnTextChanged event for the editor control but as expected it is not being called as there is no postback happening, what is the best way to raise an ajax request when the controls contents change on the client side?

something along the lines of .....

function
editorload(editor)
{
editor.attachEventHandler(
"onkeydown", checkkeypress);
}

function
checkkeypress(e)
{
    //ajax postback here
}

Thanks in advance

Mac

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 07 May 2008, 01:14 PM
Hello Mac,

Your code looks correct, you only need to change
    editor.attachEventHandler("onkeydown", checkkeypress);
to
    editor.attachEventHandler("keydown", checkkeypress);

and all should work fine.

Sincerely yours,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Mac
Top achievements
Rank 2
Answers by
Tervel
Telerik team
Share this question
or