Hello,
In a php-driven website I am using DOJO as Ajax-toolkit.
First I'm gonna explain a little code on the howto:
what it says is, get the file jobform.php, and send its response to the DIV with the name "jobs"
In the file jobform.php I have my form defined, containing an FCK-editor Field:
now the actual problem:
first time i click the image wich loads the dojo function show_job_form, it displays the form, everything is fine.
Than i submit the form (again with a dojo function)
it says, take the form called "form_job_update" and send it to job_update.php to process it
job_update.php contains some standard code to put _POST values into the database using mysql.
So, like i wrote before, when i first time SAVE everything is fine, when i click the image wich calls show_job_form AGAIN; FCKEDITOR suddenly DOES NOT HAVE A TOOLBARSET anymore,...
does anyone have a suggestion how to solve this problem?
In a php-driven website I am using DOJO as Ajax-toolkit.
First I'm gonna explain a little code on the howto:
function show_job_form(jobid, type) {
dojo.xhrGet( {
preventCache:true,
url: "jobs/input/actions/jobform.php?jobid=" + escape(jobid) + "&type=" + escape(type),
handleAs: "text",
timeout: 5000,
load: function(response, ioArgs) {
dojo.byId("jobs").innerHTML = response ;
return response;
},
});
}
what it says is, get the file jobform.php, and send its response to the DIV with the name "jobs"
In the file jobform.php I have my form defined, containing an FCK-editor Field:
<?
$oFCKeditor = new FCKeditor('FCKeditor1');
$oFCKeditor->BasePath = 'properties/FCKeditor/';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '545' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->Value = $row['jobDescription'];
$oFCKeditor->Create();
?>
now the actual problem:
first time i click the image wich loads the dojo function show_job_form, it displays the form, everything is fine.
Than i submit the form (again with a dojo function)
function update_job() {
dojo.xhrPost ({
url: "jobs/input/actions/job_update.php",
handleAs: "text",
// Name of the Form we want to submit
form: 'form_job_update',
});
}
it says, take the form called "form_job_update" and send it to job_update.php to process it
job_update.php contains some standard code to put _POST values into the database using mysql.
So, like i wrote before, when i first time SAVE everything is fine, when i click the image wich calls show_job_form AGAIN; FCKEDITOR suddenly DOES NOT HAVE A TOOLBARSET anymore,...
does anyone have a suggestion how to solve this problem?
Re: Loading the FCK editor with DOJO causes troubles,...
google brought me to the "ajax" property of the FCK object
so i added $oFCKeditor->ajax = true; to my php code, but the problem remains,...
anyone?
Re: Loading the FCK editor with DOJO causes troubles,...
Re: Loading the FCK editor with DOJO causes troubles,...
viewtopic.php?f=6&t=6894&start=0&st=0&sk=t&sd=a&view=print
Re: Loading the FCK editor with DOJO causes troubles,...
Re: Loading the FCK editor with DOJO causes troubles,...
function FCKeditor( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/properties/FCKeditor/' ; $this->Width = '100%' ; $this->Height = '200' ; $this->ToolbarSet = 'Default' ; $this->Value = '' ; $this->Config = array() ; }Re: Loading the FCK editor with DOJO causes troubles,...
<head>... <script type="text/javascript"> var oFCKeditor = new FCKeditor("fckname") ; oFCKeditor.BasePath = "..."; oFCKeditor.ToolbarSet = "..."; ... oFCKeditor.ReplaceTextarea(); </script> </head> <body> ...Check if you have something along these lines:
<head>... <script type="text/javascript"> function onpageload() { var oFCKeditor = new FCKeditor("fckname") ; oFCKeditor.BasePath = "..."; oFCKeditor.ToolbarSet = "..."; ... oFCKeditor.ReplaceTextarea(); } </script> </head> <body onload="onpageload()"> ...Re: Loading the FCK editor with DOJO causes troubles,...
if you download the latest package you ll see a file named fckeditor.php wich will lead you to fckeditor_php5.php (since i m using php 5)
the way i build my editor is the one i refered to earlier (the one in the very first post, 2nd snippet)
Re: Loading the FCK editor with DOJO causes troubles,...
There's no such "ajax" property.
Re: Loading the FCK editor with DOJO causes troubles,...
Re: Loading the FCK editor with DOJO causes troubles,...
First of all, what i did to solve the toolbar problem:
I'm not using the phpclass anymore to create the editor, I use javascript now to do it.
Now my new problem (and I don't know if that also happened before I left the phpclass for what it was):
The data from the editor field doesn't get posted anymore :s
When I load the form I put data in it wich comes from my database. When I edit, and click the forms save button, the data that gets posted is NOT the modified data, but the ORIGINAL data that is in the form when I load it. The editted data gets lost somewhere, and I have totaly NO IDEA in what part of my code I should look to solve this problem,...
Can anyone help me forward in debugging this? (NB: still using AJAX)
thanks in advance