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

Client Side API

1 Answer 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
trung
Top achievements
Rank 1
trung asked on 16 Aug 2010, 04:33 PM
I'm using RadControls for ASP.NET AJAX Q2 2009 SP1. I try to use javascript to call some funtion in RadEditor. But some funtion not work.Here my code
<script language="javascript" type="text/javascript">
    function Execute(command, args) {
        var o = new Object();
        o.get_value = function() { return args; }
        o.get_commandName = function() { return command; }
        $find("txtText").fire(command, o);
        alert(args);
    }
</script>
                    <select size="1" name="cboFont"  onchange="return Execute('FontName',this.value)" >
                        <option value="Arial">Arial</option>
                        <option value="Time New Roman">Time New Roman</option>
                    </select>
                    <select size="1" name="cboSize" onchange="return Execute('RealFontSize',this.value)">
                        <option value="15">15</option>
                        <option value="18">18</option>
                        <option value="20">20</option>
                    </select>
RealFontSize command work but FontName command not work. Please help me. Thank!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Aug 2010, 09:03 AM
Hi Trung,

You should use the following syntax to execute the FontName command:

$find("txtText").fire("FontName", { value: "Verdana" });


All the best,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
trung
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or