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

[Solved] MVC Editor with Ajax action link

0 Answers 30 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
noor buhlak
Top achievements
Rank 1
noor buhlak asked on 05 Jul 2011, 04:16 PM
Hi All
I have MVC Editor in a parital view, I have ajax action link to render the partial view

This is the code of Ajax action Link
<div id="abuse-<%=comment.id %>">
    <%= Ajax.ActionLink("Report Abuse", "Create", new { commentid = comment.id }, new AjaxOptions { HttpMethod = "POST", LoadingElementId = "abuse-loading-" + comment.id, UpdateTargetId = "abuse-" + comment.id, OnSuccess = "jQuery('#Cause').tEditor({})"})%>
    <div id="abuse-loading-<%=comment.id %>" style="display: none">
             <img src="#" alt="Loading Please Wait" />
    </div>
</div>

after clicking on the link the editor appear correctly but the color, Font size and all edito buttons don't work, I tried to put on the success event in AjaxOption

jQuery('#Cause').tEditor({})


but also not work with Javascript error

Error: b is undefined
Source File: http://localhost:1780/Scripts/MicrosoftAjax.js
Line: 5

This is the Code in the Partial View

<%= Html.Telerik().Editor().Name("add-comment-content").Tools(tools => tools.Clear().Bold().Italic().FontSize().FontName().Break().Separator().FontColor().InsertOrderedList().InsertUnorderedList().Separator().Indent().Outdent())%>
<%= Html.Hidden("parent_comment") %>
<div class="form-actions">
    <button type="submit" class="t-button">
        Submit Comment!
    </button>
</div>

Thanks in advance,
Noor

Tags
Editor
Asked by
noor buhlak
Top achievements
Rank 1
Share this question
or