using OnClientLoad method ( logic inside)

2 posts, 0 answers
  1. pr
    pr avatar
    1 posts
    Member since:
    Feb 2011

    Posted 16 Feb 2011 Link to this post


    I am using extensions\wpresources\RadEditorSharePoint\ .
    In moss, I want implement popup new windows for Links inside rad editor, I want to mention custom width n height (  They may chage in next developemnt)

    trial -1:
    I tried to use directly inside radwindow  bt it didn't worked out, this piece of code striping by itself.

    trial -2

    I gone through  yur foum and you are using OnclientLoad javascript method for 

    So I tried to implement it.  see below :

    On page layout 
    <script type="text/javascript">
    function OnClientLoad(editor)
           editor.attachEventHandler ("onclick", function (e)
                var sel = editor.getSelectedElement(); ; //get the currently selected element
                var href = null;
                var ele = document.getElementById("popupwindow");
    if (ele)
    if (sel.tagName == "A")
     href = sel.href; //get the href value of the selected link, null, "height=500,width=500,status=no,toolbar=no,menubar=no,location=no");
    return false;

    For telerik:
    <telerik:RadHtmlField id="pagecontent" FieldName="PublishingPageContent" runat="server" AllowSpecialTags="true" OnClientLoad="OnClientLoad"/>

    URl link will be like this, in HTML mode rad-
    <div id = "popupwindow">
    <a href blah blah>
    But I am getting an error :
    An error occurred during the processing of . Type 'Telerik.SharePoint.FieldEditor.RadHtmlField' does not have a public property named 'OnClientLoad'.

    Trial -3 :

    In configfile.xml :  I added <property name="OnClientLoad">OnClientLoad</property> 
    still I am getting error: -> does not have a public property named 'OnClientLoad'.

    Any suggestions???  Is there any way i can implement these popup links with custom width n height inside rad editor?
  2. Stanimir
    Stanimir avatar
    1654 posts

    Posted 17 Feb 2011 Link to this post

    Hi pr,

    You need to use the ASP.NET AJAX version of RadEditor for MOSS, which now is 5.8.6. What I suggest you to do is upgrade to it. You can download a fully functional trial and follow the next upgrade article: Upgrade Instructions from version 4.x to version 5.x.

    Also review the following online help articles:
    Set Properties Via Config File
    Add/Remove tools from the toolbar
    ExternalDialogsPath property

    All the best,
    the Telerik team
Back to Top