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

[Solved] disabling the RAD tool via javascript

6 Answers 108 Views
RadEditor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
cdutson
Top achievements
Rank 1
cdutson asked on 16 Aug 2006, 01:13 PM
Hi there, i was just wondering if anyone has actually figured out how to disable an entire rad editor tool (buttons, input, etc) via javascript? I tried running through a disable script I created, but even though it "disables" all text areas.. its still working!

6 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 18 Aug 2006, 07:19 AM


Hi Corey,

There is an example that shows how to disable the editor with javascript which you can find here. You can use it as a basis for your code.

Kind regards,

Digibo
the telerik team
0
cdutson
Top achievements
Rank 1
answered on 18 Aug 2006, 02:10 PM
yeah... when I tried to actually use that code in my project, it wouldnt work. Nothing I did could actually make the thing disable.
0
Dimitar Milushev
Telerik team
answered on 22 Aug 2006, 07:58 AM

Hi Corey,

Can you please share with us the approach you are using to disable the editor and what problems you are encountering? This will enable us provide more meaningful help.

Sincerely yours,
Digibo
the telerik team
0
cdutson
Top achievements
Rank 1
answered on 22 Aug 2006, 01:19 PM

Well i tried implementing that javascript code from the example in the code library. Now, the code didnt crash, and it would be called and all that, but it just... didn't do anything.

So I tried just creating my own disable script which goes through (recursively) and disables all the inputs and selects etc within any node i specify. This worked on all the html fields I had, but when it got to the rad editor, it would disable HTML view just fine, but the WYSIWYG mode just kept on chugging.

So I copped out and made a hidden label that contains all the same content as would be in the iFrame of the editor. Then using that same disable/ enable function i check each Node it runs through for a specific class I gave to it and will show/hide the editor (which is inside a panel) or label.

So yeah, not the most graceful solution, but it worked!

0
cdutson
Top achievements
Rank 1
answered on 22 Aug 2006, 01:19 PM

Well i tried implementing that javascript code from the example in the code library. Now, the code didnt crash, and it would be called and all that, but it just... didn't do anything.

So I tried just creating my own disable script which goes through (recursively) and disables all the inputs and selects etc within any node i specify. This worked on all the html fields I had, but when it got to the rad editor, it would disable HTML view just fine, but the WYSIWYG mode just kept on chugging.

So I copped out and made a hidden label that contains all the same content as would be in the iFrame of the editor. Then using that same disable/ enable function i check each Node it runs through for a specific class I gave to it and will show/hide the editor (which is inside a panel) or label.

So yeah, not the most graceful solution, but it worked!

0
Dimitar Milushev
Telerik team
answered on 24 Aug 2006, 03:17 PM

Hello Corey,

I'm glad you've found a way that works for you. If there is anything we can help with or you have other questions, feel free to ask.

Greetings,
Digibo
the telerik team
Tags
RadEditor
Asked by
cdutson
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
cdutson
Top achievements
Rank 1
Share this question
or