Error when loading Content to an editor via Javascrpt.

Last post 04-16-2008, 2:35 PM by azilberbaum. 3 replies.
Sort Posts: Previous Next
  •  04-16-2008, 2:13 PM 39337

    Error when loading Content to an editor via Javascrpt.

    I load certian content to my editor via javascript everything works fine, except for one thing.
     
    When I switch between the modes, it gets all messed up and my data just kinda disapers.
     
    Is this a bug or am I doing something wrong?
     
    Adam
  •  04-16-2008, 2:21 PM 39338 in reply to 39337

    Re: Error when loading Content to an editor via Javascrpt.

    Demo:
     
     
     
    SetHTML() This method is used for setting the content of CuteEditor.

    Example:

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

    // setting the content of Cute Editor
    editor1.setHTML("Hello World");

    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

  •  04-16-2008, 2:22 PM 39339 in reply to 39337

    Re: Error when loading Content to an editor via Javascrpt.

    Also getting the following error in FireFox when my page loads:
    Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.designMode]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://localhost/EBookVendingMachine/CuteSoft_Client/CuteEditor/Load.ashx?type=scripts&file=Gecko_Loader :: Ox877 :: line 3"  data: no]
     
     
    and them when I click the button to do the java script to load the content, I get the following error:
     
    Error: modalEditor.GetDocument is not a function
    Source File: http://localhost/ebookvendingmachine/userbookedit.aspx?bookID=3641&pageID=9
    Line: 90
  •  04-16-2008, 2:35 PM 39342 in reply to 39339

    Re: Error when loading Content to an editor via Javascrpt.

    the above was a FireFox error and doesnt have to do with the initial post just to be clear.
     
    The .SetHtml()   seemed to fix the first problem.
View as RSS news feed in XML