Hi,
I am trying to populate an FCKeditor box based on selection criteria on the radio buttons. This is only for adding a new session and I want it to be editable later. Currently I have the javascript being built in PHP as it is database driven. I have tried to populate the hidden input box (text) and although the value is populated it doesn’t show in the FCKeditor. Below is the code that I have at the moment.
function trainingHeader(header, text)
{
document.getElementById(“header”).innerHTML = text;”;
$q = mysql_query (“SELECT * FROM calendar_cat WHERE cat_id = 1”);
$row = mysql_fetch_array($q);
$text = addslashes($row[‘descrip’]);
echo “document.getElementById(“text”).value = “{$text}”;
echo “alert (document.getElementById(“text”).value = “{$text}”);
}
Here is the FCKeditor:
$oFCKeditor = new fckeditor(‘text’) ;
$oFCKeditor->BasePath = ‘../core/fckeditor/’;
$oFCKeditor->Value = $_POST[‘text’];
$oFCKeditor->Height = 400;
$oFCKeditor->Create() ;
Forgive me if this is completley the wrong way of going about it – I have very basic knowledge of Javascript but want to learn – so any help is appreciated.