Problum while opening filemanager dialog for tinymce custom plugin

Vote:
 

Hi All,

I am tring to build a custom plugin on the same line of adv image plugin.For that i need to open filemanager dialog box on click of a button where editor can select desired image  from file manager.

Following is the code which i have used

---------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Build Image Plugin</title>
    <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
    <script type="text/javascript" src="js/dialog.js"></script>
    <script type="text/javascript" src="../../utils/form_utils.js"></script>
    <script type="text/javascript" src="js/image.js"></script>
    <script type="text/javascript" src="../../utils/editable_selects.js"></script>
    <script src="/Util/javascript/episerverscriptmanager.js" type="text/javascript"></script>
    <script src="/Util/javascript/system.js" type="text/javascript"></script>
    <script src="/Util/javascript/system.aspx"  type="text/javascript"></script>
<script src="/util/javascript/episerverscriptmanager.js" type="text/javascript"></script>


    <script type="text/javascript">

        function LaunchFileManagerBrowser()
         {
            
             
            var dialogUrl = '<%= EPiServer.UriSupport.ResolveUrlFromUIBySettings("edit/FileManagerBrowser.aspx")%>';
           var linkAttributes = new Object();     
            var dialogArguments = linkAttributes;
            var features = {width: 600, height: 412};
            var callbackArguments = new Object();
            callbackArguments.postbackCtrlId = "<%= somearg.ClientID %>";
            /* callbackArguments.postbackCtrlId = postbackCtrlId;
           
             opens the filemanagerbrowser dialog */
            
           
            EPi.CreateDialog(
                    dialogUrl,
                    OnFileDialogClosed,
                    callbackArguments,
                    dialogArguments,
                    features);             
            
        }

        /* function called after file browser dialog has returned and closed*/
        function OnFileDialogClosed(returnValue, callbackArguments) {
            if (returnValue != undefined && returnValue != 0) {
                var myCtrl = document.getElementById(callbackArguments.myControlId);
                myCtrl.value = returnValue;
            }
        }
    
    </script>

</head>
<body>

<form onsubmit="ExampleDialog.insert();return false;" action="#">

    <p>Select the image from file manager</p>
    <p>Image: <input id="someval"  name="someval" type="text" class="text" /></p>
    <p>Author: <input id="somearg" name="somearg" type="text" class="text" /></p>
    <p><input runat="server" onclick="LaunchFileManagerBrowser();" type="button" value="..." /> </p>
    

    <div class="mceActionPanel">
        <input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" />
        <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

    </div>
</form>

</body>
</html>

---------------------

However i am getting javascript error
 that"EPi.CreateDialog is not a function

I have even checked in EPiServerScriptManager.js file located in C:\Program Files\EPiServer\CMS\6.1.379.0\Application\Util\javascriptand I also don’t see the implementation for CreateDialog() method.

#58376
Apr 23, 2012 7:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.