Re: How to retrieve fck editor value in javascript?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 01/18/2008 11:52 PM gangadhara prasad said the following:
> Hi ,
>  
> I am using fck editor.My code is
> 
> In php
> 
> $oFCKeditor1 = new FCKeditor('textinputValues[6]') ;
> $oFCKeditor1->ToolbarSet = 'Basic';
> $oFCKeditor1->Width = 785;
> $oFCKeditor1->Height = 350;
> $oFCKeditor1->BasePath= $GLOBALS['rootRel'].'admin/includes/rte/';
> $oFCKeditor1->Value=$invitationtext;
> $view_prod->assign("EDITOR1",$oFCKeditor1->CreateHtml());
> 
> In html
> 
> <form action="{CURRENT_URL}" method="post" name="addtobasket" target="_self" enctype="multipart/form-data" onsubmit="return validator();">
> {EDITOR1} //fck editor
> </form>
> 
> In javascript
> 
> var itext = document.addtobasket.elements['textinputValues[6]'].value;'
> 
> alert(itext);
> 
> It shows 'document.addtobasket.elements['textinputValues[6]'].value' is null or not an object.

I don't know because I never used FCKEditor, but you may want to take a
look at this FCKEditor plug-in that was developed for the forms
generaation and validation class to how he extracts the editor value in PHP:

http://www.phpclasses.org/form_fckeditor

http://www.phpclasses.org/formsgeneration

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux