FF/Chrome/Safari issue: if the HTML Editor is in a hidden layer when the page loads, it never displays properly

Last post 02-17-2013, 12:06 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  02-14-2013, 1:14 PM 76867

    FF/Chrome/Safari issue: if the HTML Editor is in a hidden layer when the page loads, it never displays properly

     

    ** This works fine in IE, but doesn't work in Firefox, Chrome, Safari **

     

     

    If the editor is wrapped in a HIDDEN span (STYLE="display:none" when the page loads, then you un-hide the span, the editor doesn't work. If you start the page with the span unhidden, then you can hide it afterwards.

     

    In the code below, change the SPAN definition to just <SPAN ID="HideMe"> to see the difference.

     

    I need to be able to load my editor in a layer that starts off invisible. How can I do this?

     

     

    <!-- #include virtual = "/shared/aspedit/cuteeditor_files/include_CuteEditor.asp" -->
    <html>
    <body bottommargin="0" topmargin="0" marginheight="0" marginwidth="0">
    <form name="theForm" action="Get_HtmlContent.asp" method="post" ID="Form2">

    <SPAN ID="HideMe" STYLE="display:none">
    <%

    Dim editor
    Set editor = New CuteEditor
    editor.ID = "Editor1"
    editor.FilesPath = "/shared/aspedit/cuteeditor_files"
    editor.Draw()
    %>

    </SPAN>
    <INPUT TYPE="BUTTON" onClick="document.getElementById('HideMe').style.display = '';" VALUE="Show">
    <INPUT TYPE="BUTTON" onClick="document.getElementById('HideMe').style.display = 'none';" VALUE="Hide">
    </form>
    </body>
    </html>

  •  02-17-2013, 12:06 PM 76878 in reply to 76867

    Re: FF/Chrome/Safari issue: if the HTML Editor is in a hidden layer when the page loads, it never displays properly

    Hi,

     

    I suggest you hide the span after the editor load complete, like the example below.

     

    1. <!-- #include file = "cuteeditor_files/include_CuteEditor.asp" -->  
    2. <html>  
    3. <body bottommargin="0" topmargin="0" marginheight="0" marginwidth="0">  
    4.     <form name="theForm" action="Get_HtmlContent.asp" method="post" id="Form2">  
    5.   
    6.         <span id="HideMe">  
    7.             <%  
    8.   
    9.             Dim editor  
    10.             Set editor = New CuteEditor  
    11.             editor.ID = "Editor1"  
    12.             editor.Draw()  
    13.             %>  
    14.   
    15.         </span>  
    16.         <input type="BUTTON" onclick="document.getElementById('HideMe').style.display = '';" value="Show">  
    17.         <input type="BUTTON" onclick="document.getElementById('HideMe').style.display = 'none';" value="Hide">  
    18.         <script type="text/javascript">  
    19.             function CuteEditor_OnInitialized(editor) {  
    20.                 var HideMe = document.getElementById("HideMe");  
    21.                 HideMe.style.display = "none";  
    22.             }  
    23.   
    24.         </script>  
    25.     </form>  
    26. </body>  
    27. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML