hi !
i'm building a PHP page for editing text. so i use the GREEEEASTEST FCKeditor editor !
To validate the entered text in client-front, i use a javascript function.
The problem is the value of the textarea of fckeditor is not reachable or update in my javascript function !!
if i don't use fckeditor, and put a single textarea tag, all is OK! so what is the problem with validate function ?
well, this is how i declare the fckeditor (off cource i already included the php header...):
my link who runs the validate function, it's placed (in HTML) just after the PHP previous lines :
and my javascript function :
so ? what is my problem ?
by advance thanks for your answer, it's been 2 hours for i'm searching....help
i'm building a PHP page for editing text. so i use the GREEEEASTEST FCKeditor editor !
To validate the entered text in client-front, i use a javascript function.
The problem is the value of the textarea of fckeditor is not reachable or update in my javascript function !!
if i don't use fckeditor, and put a single textarea tag, all is OK! so what is the problem with validate function ?
well, this is how i declare the fckeditor (off cource i already included the php header...):
$oFCKeditor = new FCKeditor('CH_NEW1') ; $oFCKeditor->BasePath = 'js/fckeditor/' ; $oFCKeditor->Config['EnterMode'] = 'br'; $oFCKeditor->Value = 'here you go ' ; $oFCKeditor->Create() ;
my link who runs the validate function, it's placed (in HTML) just after the PHP previous lines :
<a href="javascript:TEST_BOX1_AJOUT();">CHECK AND SAVE</a>
and my javascript function :
function TEST_BOX1_AJOUT() { alert(document.FORMU_BOX.CH_NEW1.value); // first problem ! the value is not what i update; it stays the first init value 'here you go' in my exampl }
so ? what is my problem ?
by advance thanks for your answer, it's been 2 hours for i'm searching....help
Re: my javascript fonction doesn't get the fckeditor value !
I assume that by using document.FORMU_BOX.CH_NEW1.value you are trying to retrieve the value of the editor? You can try using the editor javascript API instead to retrieve the value of the editor.
Refer to the JavaScript API section in the developer guide for more info.
Re: my javascript fonction doesn't get the fckeditor value !
i will test it.