Pasted HTML is deleted when window is closed

Last post 06-16-2009, 9:41 AM by piyushc. 6 replies.
Sort Posts: Previous Next
  •  05-29-2009, 6:53 AM 52631

    Pasted HTML is deleted when window is closed

    Hello,
     
    I am calling a custom javascript function on click of Insert button of InsertDocument window. The function simply pastes the URL of the selected document in the cute editor area present in the parent window.
     
    It all works fine (I can see the URL pasted correctly) till I close the InsertDocument window either through code or manually after which the pasted URL is automaically deleted.
     
    It does not seem like page has refreshed in anyway, still the URL is gone.
     
    Can you please tell me what the issue is and how to resolve it?
     
    Thanks,
    Piyush
  •  05-29-2009, 3:02 PM 52646 in reply to 52631

    Re: Pasted HTML is deleted when window is closed

    Piyush,
     
    Can you post your code?
     
    Why not create your own custom dialog?
     
    Add a Cross Browser Modal Dialog Box to Cute Editor

    How to create a custom button(client side) which displays a dialog?( C# | VB )

    This example demonstrates how easy it can be to add your own client side buttons to the CuteEditor by creating a Cross Browser Modal Dialog Box.

     

    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

  •  06-01-2009, 2:56 AM 52684 in reply to 52646

    Re: Pasted HTML is deleted when window is closed

    Adam,
     
    I can create a cutom dialog but I wanted to leverage the in built Insert Document functionality. The only change I want in that functionality is that on insert, it should insert image instead of the URL of the document. I do not think it is a wise idea to create a new custom dialog for this change.
     
    I see that Load.ashx is being called when the window is getting closed.
    Do you know if that is causing any problem or is there any other way I can achieve the required functionality?
     
    Thanks,
    Piyush
  •  06-01-2009, 1:11 PM 52707 in reply to 52684

    Re: Pasted HTML is deleted when window is closed

    Please open CuteSoft_Client\CuteEditor\Scripts\Dialog\Dialog_InsertDocument.js and add the following code to the end of this page:
     
    1. function do_insert()   
    2. {   
    3.     element.className = inc_class.value;   
    4.     element.target = sel_target.value;   
    5.     element.title = inp_title.value;       
    6. ....   
    7.            
    8.                
    9.     Window_SetDialogReturnValue(window,element);   
    10.     Window_CloseDialog(window);   
    11. }  

    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

  •  06-02-2009, 9:03 AM 52730 in reply to 52707

    Re: Pasted HTML is deleted when window is closed

    Hello Adam,
     
    What does the above piece of code do?
    I pasted this code at the end of Dialog_InsertDocument.js.
    Now, when I try to insert a document using InsertDocument dialog, it closes and nothing is inserted (not even the URL of the documnt).
     
    Please let me know if I am missing anything.
     
    Thanks,
    Piyush
  •  06-16-2009, 8:36 AM 53172 in reply to 52730

    Re: Pasted HTML is deleted when window is closed

    Hello,
     
    I am still hoping that somebody will help me with this issue.
     
    Piyush
  •  06-16-2009, 9:41 AM 53173 in reply to 53172

    Re: Pasted HTML is deleted when window is closed

    Never mind, I figured it out.
     
    Thanks,
    Piyush
View as RSS news feed in XML