I have created a word document that outlines my method to allow saving changes in the fckEditor without posting back to the server.
Why is this an advantage ?
1. You can save multiple times without losing your place. Since the page is not posting back, your current editing state is preserved- highlighted text stays highlighted, your cursor remains where it is etc.
2. If your editor is on a page that requires a login and that login expires after say 20 minutes, if you are in the middle of editing and leave for lunch, when you return and click save, you would be sent back to a login page and changes would be lost. This prevents that from happening.
How it works.
When you click the save button on the toolbar, the save functionality is overridden by a custom JavaScript function.
The function gets the HTML from the editor instance creates an XML document and sends it to an ASP page on the server. This is done directly from the browser (Client) to the server without reloading the page.
The ASP page saves the document and then returns a text message which pops up in the browser.
I was going to post the word doc here but see that docs are blocked.
I have been using this code for about 3 years and recently upgraded the editor to the latest version.
The code works on IE in Vista but I have not tried it with other browsers. My clients are all using IE.
Please have a look and give it a try if interested.
It would be easy to convert to ASP.NET or other .
Please drop me an email if you want a copy of the document.
Bill
bill.macintyre@ServiceCanada.gc.ca
Why is this an advantage ?
1. You can save multiple times without losing your place. Since the page is not posting back, your current editing state is preserved- highlighted text stays highlighted, your cursor remains where it is etc.
2. If your editor is on a page that requires a login and that login expires after say 20 minutes, if you are in the middle of editing and leave for lunch, when you return and click save, you would be sent back to a login page and changes would be lost. This prevents that from happening.
How it works.
When you click the save button on the toolbar, the save functionality is overridden by a custom JavaScript function.
The function gets the HTML from the editor instance creates an XML document and sends it to an ASP page on the server. This is done directly from the browser (Client) to the server without reloading the page.
The ASP page saves the document and then returns a text message which pops up in the browser.
I was going to post the word doc here but see that docs are blocked.
I have been using this code for about 3 years and recently upgraded the editor to the latest version.
The code works on IE in Vista but I have not tried it with other browsers. My clients are all using IE.
Please have a look and give it a try if interested.
It would be easy to convert to ASP.NET or other .
Please drop me an email if you want a copy of the document.
Bill
bill.macintyre@ServiceCanada.gc.ca