I am creating a 'Save and Contiue' button. I am almost finished coding it. I just need to know what is the variable name that holds the html source?
I tried looking at the code from the html source edit mode but could find where they get the data from.
Chris
I tried looking at the code from the html source edit mode but could find where they get the data from.
Chris
RE: Where is HTML stored
function putContent(instanceName,content) {
editor_frame = document.getElementById(instanceName+'___Frame');
if (editor_frame!=null) {
editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea');
if (editor_source!=null) {
editor_source.contentWindow.document.body.innerHTML=content;
return true;
}
}
return false;
}
RE: Where is HTML stored
var oEditor = window.parent.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
var html = FCK.GetXHTML();
there is also an FCK.GetHTML() function, but right now i can't remember exactly what the difference is - just take a look at the code, or try both and compare the result.
good luck.
RE: Where is HTML stored
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'MyHTML' ) ;
oFCKeditor.BasePath = "./"
oFCKeditor.Width = "100%" ;
oFCKeditor.Height = 350 ;
oFCKeditor.Create() ;
</script>
This is in the initial PERL script and in the second script I used the following:
$my_html = $christophermichael->param('MyHTML');
open(SOURCE, ">my_html.cms");
print SOURCE "$my_html";
close(SOURCE);
This, obviously, saves all of the HTML and text from the 'textarea' that FCK creates to my own database file for later use.
Clicking the save icon runs my script which saves the HTML to the database.
Now for a "save and continue" I would add more code to my script that saves the html to my database. I would set the $value in my FCK create(); to all of my html so that while I saved my html, the editor is still ready to go.
I could just of well created a seperate subroutine in the same perl script to save the html and recreate the editor with my html in it but i am integrating this into a system that I already had in place.
Now this was probably nothing like what you're doing. And if it's true, I apologize and blame it on the 2.5 days without sleep ha