Set Height in script doesn't change the Framestyle height in Firefox

Last post 02-28-2008, 10:45 AM by fredd. 10 replies.
Sort Posts: Previous Next
  •  11-03-2007, 7:59 PM 34810

    Set Height in script doesn't change the Framestyle height in Firefox

    In Firefox: (The display works correctly in IE)
     
    The page height is 528px, then I execute this code:
     
    editor1.style.height="800px";
     
    Here's what the page look likes before this code:
     
     
     
    After executing the code, the CE goes to the right height, but the FrameStyle stays the same:
     
     
     
    You can see that the FrameStyle has not changed.
     
    How to fix this?
    FredD
  •  11-05-2007, 2:31 PM 34831 in reply to 34810

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Fredd,
     
    This is not the correct method to change the editor's height.
     
    Please use the following method:
     
    SetWidth() This method is used for setting the width of CuteEditor

    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('<% = Editor1.ClientID%>');

    // setting the width of CuteEditor
    editor1.SetWidth("1000");
    editor1.SetWidth("1000px");
    SetHeight() This method is used for setting the height of CuteEditor

    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('<% = Editor1.ClientID%>');

    // setting the height of CuteEditor
    editor1.SetHeight("1000");
    editor1.SetHeight("1000px");

    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

  •  11-06-2007, 1:05 PM 34849 in reply to 34831

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    How bizarre...
     
    I saw this type of code elsewhere and I thought you just showing 2 different ways to SetHeight and that either one was acceptable.
     
    I had no idea you had to have both....! :)
     
    Thanks, Adam
    FredD
  •  02-26-2008, 10:08 PM 37374 in reply to 34849

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Firefox:
    Although you said above that SetHeight was the function to use, we are getting the error that SetHeight is not a function.
     
    How do I set the editor height in Firefox?
  •  02-27-2008, 12:47 AM 37378 in reply to 37374

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    fredd,
     
    Are you sure you get the editor object correctly?
     
    If yes, please download the control again and create a separate virtual directory for testing.

    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

  •  02-27-2008, 9:54 AM 37392 in reply to 37378

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Yes,
     
    I've done that now. It still leaves the height the same and floats it in the center of the frame instead of positioning it at the top and setting the height to the requested size.
     
    Do you have an online example, Adam, that I can test in FireFox?
     
    FredD
  •  02-27-2008, 12:39 PM 37397 in reply to 37392

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    fredd:
    Yes,
     
    I've done that now. It still leaves the height the same and floats it in the center of the frame instead of positioning it at the top and setting the height to the requested size.
     
    Do you have an online example, Adam, that I can test in FireFox?
     
    FredD
     
     
    Keep me posted
     

    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

  •  02-27-2008, 5:41 PM 37405 in reply to 37397

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Thanks, Adam, for putting up the example. Your code matches my code, but mine isn't working...
     
    I will download the latest version and try again.
     
    FredD
  •  02-28-2008, 1:11 AM 37408 in reply to 37405

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Adam,
     
    I've downloaded and installed the latest version, and it still reports that SetHeight is not a valid function in FireFox. What can I do to trace this? The function I call has several references to the editor and they all work, but when the call is made to to SetHeight, it gives the error.
     
    Can you tell me where SetHeight is located in your various javascript files and can you give me the date of that latest javascrip file, please?
     
    Regards.
    FredD
  •  02-28-2008, 1:38 AM 37411 in reply to 37408

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    FredD,
     
    >>I've downloaded and installed the latest version
     
    Can you create a seperate application to test the following code?
     

    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>

    <html>
        <head>
        <title>SetHeight - JavaScript API</title>
       <script language="JavaScript" type="text/javascript" >  
       function SetHeight(val)
       {
        // get the cute editor instance
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        if(val)
         editor1.SetHeight(val);
       }   
       
      </script>
     <body>
            <form runat="server">
          <h1>SetHeight - JavaScript API</h1>
          This example shows you how to use CuteEditor JavaScript API to customize the application.
          <br><br>
          <CE:Editor id="Editor1" Width="560" TemplateItemList="[Save,Bold,Italic,Underline,InsertChars,InsertEmotion]" ThemeType="OfficeXP" Height="250" runat="server"></CE:Editor><br />
          <p style="width:600">  
          <INPUT type=button value="SetHeight - 100" onclick="SetHeight(100)" ID="Button2">
          <INPUT type=button value="SetHeight - 200" onclick="SetHeight(200)" ID="Button2">
          <INPUT type=button value="SetHeight - 400" onclick="SetHeight(400)" ID="Button2">
          <INPUT type=button value="SetHeight - 800" onclick="SetHeight(800)" ID="Button2">
      </form>
     </body>
    </html>


    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

  •  02-28-2008, 10:45 AM 37420 in reply to 37411

    Re: Set Height in script doesn't change the Framestyle height in Firefox

    Adam,
     
    In a simple environment it appears that all is OK, but when the form is complex, there are issues.
     
    The problem is timing, I think. We are trying to call the SetHeight function during the PageLoad event, when a lot of other functions are also being called. At the time we call the function, it appears that the Editor as an object exists (we tested that), but the script supporting the call to SetHeight has not loaded completely (if it's started at all). We've hit this with other objects from time to time.
     
    We are experimenting with delaying the timing of the call and have had some success, but it's not pretty at this point.
     
    Thanks for your help.
     
    FredD
View as RSS news feed in XML