Re: Problems with IE7 when using latest version as Image Selector

  •  08-19-2008, 1:09 PM

    Re: Problems with IE7 when using latest version as Image Selector

    Paul,
     
    >>Second problem is I used to launch a window from CE and be able to close the window with a simple javascript call "window.close();". This also no longer works.
    use  window.top.close()
     
    For the first question, please use the following code:
     
    <Script Language="javascript">
        function callInsertImage() 
        { 
       var editor1 = document.getElementById('<%=Editor1.ClientID%>');
                editor1.FocusDocument(); 
                var editdoc = editor1.GetDocument(); 
                editor1.ExecCommand('new');
                editor1.ExecCommand('ImageGalleryByBrowsing');
                InputURL();
        }   
       
        function InputURL()
        {
      var editor1 = document.getElementById('<%=Editor1.ClientID%>');
            var editdoc = editor1.GetDocument(); 
            var imgs = editdoc.images;
            if(imgs.length>0) 
            { document.getElementById("imageFld").value = imgs[imgs.length-1].src;
                editor1.ExecCommand('new');
                document.getElementById("imageFld").focus();
            } 
            else
            {
       setTimeout(InputURL,500);
            } 
        }      
    </script>
     
    Demo:
     
    How to use CuteEditor as an image selector?

    How to use CuteEditor as an image selector?( Demo1 |  Demo2 )

    This example demonstrates how to use CuteEditor as an image selector.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread