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

Javascript error on click of an disabled input button

5 Answers 54 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sambasiva
Top achievements
Rank 1
Sambasiva asked on 20 Aug 2008, 04:07 AM
Hi,

I have placed an input button (by default disabled) and radeditor in my screen. I want to fire a command on click of the button when it got enabled. But the button throwing me a javascript error when it is disabled. The exception details are as follows,

Line :    5949
Error:    Sys.ArgumentException: Value must be a DOM element.
Parameter Name: element.


And it is observed that, when no editor is placed in the form and clicking the button is not throwing any exception.

Please give me some suggestions to resolve this problem.

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Aug 2008, 02:56 PM
Hello Sambasiva,

Please, open a support ticket and send a sample working project that demonstrates the problem. I want to examine your code and reproduce the problem. Once I am able to reproduce the problem I will try to provide a solution.

Looking forward to hearing from you,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sambasiva
Top achievements
Rank 1
answered on 21 Aug 2008, 04:40 AM
Hi Rumen,

I have opened a support ticket #157229 and attached workable project. Please examine the application and provide me your suggestions.
0
Rumen
Telerik team
answered on 25 Aug 2008, 12:47 PM
Hi Sambasiva,

Thank you for the provided project in your support ticket.

I examined it and found that the problem is due to a well known bug in ASP.NET AJAX which appears only with disabled elements. It has nothing to do with RadEditor and can be reproduced with the following code:

<head runat="server">
    <title>Untitled Page</title>
    <script>
    function ExecuteCommand(cmd)
    {
         alert(1);
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
       
        <input type="button" value="Bold" onclick="ExecuteCommand('Bold')"/>
        <input type="button" value="Italic" onclick="ExecuteCommand('Italic')" disabled/>
       
        <telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Design">
        <Tools>
            <telerik:EditorToolGroup Tag="Bold"></telerik:EditorToolGroup>
        </Tools>
        <Content>
            Sample application
        </Content>
        </telerik:RadEditor>
    </form>
</body>
</html>

The problem is logged in ASP.NET AJAX bug tracking system and the guys from MS should fix it.


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sambasiva
Top achievements
Rank 1
answered on 09 Sep 2008, 06:20 AM
Hai Rumen,

Can i have any updates on this issue??
0
Rumen
Telerik team
answered on 09 Sep 2008, 09:42 AM
Hi Sambasiva,

As I wrote in my earlier reply this is an issue with the ASP.NET AJAX framework in general (when having disabled elements) which is confirmed in the following public forum post:

http://forums.asp.net/p/1151199/1918939.aspx

The bug should be resolved by Microsoft.


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Sambasiva
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Sambasiva
Top achievements
Rank 1
Share this question
or