JavaScript Radeditor set_html working but throws a javascript error that stops the rest of the function

I have a table that contains a number of input boxes that represent custom tags within the RadEditor, something like this:

(td:0)      (td:1)
Foo value : [______________]
Bar value : [______________]
            [OK]

these are to replace text holders within the RadEditor, eg:

Lorem ipsum dolor sit amet, [Foo] consectetur adipiscing elit. 
Nulla ultrices dolor [Foo] ipsum, sit amet venenatis massa mollis at. 
Aliquam id fringilla [Bar]. Curabitur massa erat, feugiat.

On the click of the OK button, the text is replaced, and the table in which the values were entered should be hidden. Using the following javascript code

$('.populate-fields').click(function(e){
    e.preventDefault();
    var criteria = [];
    $('#<%= tableCriteria.ClientID %> tbody .js-criteria-row').each(function(index, el){
        var crit = {};
        crit.field = $(el).find('td:eq(0)').text();
        crit.value = $(el).find('td:eq(1) :input').val();
        criteria.push(crit);
    });
    var x = radeditor.get_html(true);
    $.each(criteria, function(index, value){
        var regex = new RegExp("\\["+value.field.toLowerCase()+"\\]", "gi");
        x = x.replace(regex, value.value);
    });
    radeditor.set_html(x);
    $('#<%= tableCriteria.ClientID %>').hide();
});

the content gets replaced, but is then followed by the following error (in chrome developer tools) on the radeditor.set_html(x) line.

Uncaught TypeError: Property '0' of object [object Array] is not a function VM333:6
(anonymous function) VM333:6
Telerik.Web.UI.RadWebControl.raiseEvent VM333:908
Type.callBaseMethod VM333:6
b.RadEditor.raiseEvent VM333:10347
(anonymous function) VM333:11720
b

where VM333 Line 6 is the following code in the MicrosoftAjax.js file :

Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var ..........[trimmed]

Because of this error, the $('#criteria-table').hide(); line of code never gets run.

The page's aspx file, consists basically of this

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="true" ScriptMode="Release" OutputCompression="AutoDetect" ></telerik:RadScriptManager>

<asp:Table id="tableCriteria" runat="server" cellpadding="5" cellspacing="3" />
<telerik:RadEditor runat="server" ID="letterRadEdit" ToolbarMode="Default" EditModes="Design,Html" OnClientCommandExecuting="$pcmis._editor_command" 
    ToolsFile="~/App_Data/Editor.xml" Width="718px" EnableResize="false" EnableEmbeddedSkins="true" OnClientLoad="resizeMe" Skin="Windows7" OnClientSelectionChange="$page.setdirty" ContentFilters="DefaultFilters" EnableEmbeddedBaseStylesheet="true">
    <ExportSettings OpenInNewWindow="true" FileName="letter.pdf" />
    <SpellCheckSettings DictionaryLanguage="en-GB" AllowAddCustom="false" />
    <Languages>
        <telerik:SpellCheckerLanguage Code="en-GB" Title="English (UK)" />
    </Languages>
    <CssFiles>
        <telerik:EditorCssFile Value="/assets/css/radeditor.default.css" />
    </CssFiles>
</telerik:RadEditor>

For information The resizeMe javascript function is simply this:

var radeditor = null;
function resizeMe(editor, args){
    radeditor = editor;//
    radeditor.setSize('712', (($('#modal-holder').height()) * 0.85).toString());
}
Answer:1

my problem is that i am using jquery UI tabs in my website. the content in the tabs is loaded dynamically or you ca say whenever i click the tabs another html page is displayed in the tabs display ...

my problem is that i am using jquery UI tabs in my website. the content in the tabs is loaded dynamically or you ca say whenever i click the tabs another html page is displayed in the tabs display ...

  1. jquery syntax highlighter textarea
  2. jquery syntax highlighter
  3. jquery syntax highlight editor
  4. jquery html syntax highlighter
  5. jquery sql syntax highlighter
  6. jquery php syntax highlighter
  7. notepad++ jquery syntax highlighting
  8. syntax highlighter jquery plugin

I am using AJAX call in my code using Javascript. function loadFacility(callback) { //alert('In loadFacility'); var xmlhttp; var keys=document.firstCallInformation.facilityselect.value; ...

I am using AJAX call in my code using Javascript. function loadFacility(callback) { //alert('In loadFacility'); var xmlhttp; var keys=document.firstCallInformation.facilityselect.value; ...

  1. parse ajax response json
  2. parse ajax response html
  3. parse ajax response json array
  4. parse ajax response javascript
  5. parse ajax response
  6. parse ajax response jquery
  7. parse ajax response object
  8. parse ajax response to string
  9. parse ajax response array
  10. parse ajax response text
  11. parse ajax response js
  12. ajax parse response example
  13. parse json ajax response jquery
  14. parse json ajax response in javascript
  15. jquery parse ajax response html
  16. python parse ajax response
  17. parse ajax xml response in javascript
  18. parse xml ajax response
  19. parse error ajax response
  20. ajax parse json response example

Here is my code to upload image, It is working fine if i give the form action as same server NOT working if i give action to different server html : <div id="dropzone"> ...

Here is my code to upload image, It is working fine if i give the form action as same server NOT working if i give action to different server html : <div id="dropzone"> ...

  1. dropzone image upload in laravel
  2. dropzone image upload in php
  3. dropzone image upload in codeigniter
  4. dropzone image upload example
  5. dropzone image upload
  6. dropzone upload image on button click
  7. react dropzone image upload
  8. dropzone single image upload
  9. dropzone multiple image upload laravel
  10. dropzone multiple image upload
  11. dropzone multiple image upload in php
  12. jquery dropzone image upload
  13. dropzone js image upload
  14. dropzone.options.image upload
  15. dropzone resize image before upload
  16. dropzone rotate image before upload
  17. dropzone remove image after upload
  18. dropzone edit image before upload

I have executed e2e test for following code using angular it('should successfully login and create a session using valid credentials', function() { browser.get('http://www.angularjs.org'); ...

I have executed e2e test for following code using angular it('should successfully login and create a session using valid credentials', function() { browser.get('http://www.angularjs.org'); ...