Hi
I am using a repeat region in a php page. The thing is that , the code repeats in the repeated region with same instance name as below.
the problem is that all fckeditor on the page have the same default value that is the first record of the recordset. I guess this happens because they have the same name 'users_quickinfo'. I cannot change the the names to 'users_quickinfo1' , 'users_quickinfo2' cause my script cannot work in that way.
are there any way to get arround this. thanks a lot.
Here is the code
$oFCKeditor = new FCKeditor('users_quickinfo') ;
$oFCKeditor->Config['CustomConfigurationsPath'] = '/FCKeditor/forum.js' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = $row_rsdecriptionapprove['users_quickinfo'];
$oFCKeditor->Create() ;
I am using a repeat region in a php page. The thing is that , the code repeats in the repeated region with same instance name as below.
the problem is that all fckeditor on the page have the same default value that is the first record of the recordset. I guess this happens because they have the same name 'users_quickinfo'. I cannot change the the names to 'users_quickinfo1' , 'users_quickinfo2' cause my script cannot work in that way.
are there any way to get arround this. thanks a lot.
Here is the code
$oFCKeditor = new FCKeditor('users_quickinfo') ;
$oFCKeditor->Config['CustomConfigurationsPath'] = '/FCKeditor/forum.js' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = $row_rsdecriptionapprove['users_quickinfo'];
$oFCKeditor->Create() ;
RE: Same instance name of fckeditor
I attempted to try to hack in a way to make it so I can specify a seperate id and name so that the items can have a unique id, but the form NAMES would have the same name as they are supposed to. I got lost in the code though. Is there any way to fix this problem?
Re: Same instance name of fckeditor
Re: Same instance name of fckeditor
Put the following code into a php loop:
Results in several FCKeditor boxes named 'text', but all with the same value. Instead, change FCKeditor('text') to FCKeditor('text' . rand()). This results in several FCKeditor boxes uniquely named, and now each box displays the appropriate data.
The really strange thing is that, in the original code where all are named 'text', the HTML source has unique data for the 'value' variable for each instance, it just doesn't display correctly on the webpage. Would really appreciate any help here.
Cheers
Re: Same instance name of fckeditor
Re: Same instance name of fckeditor
But the instance names really do need to be unique regardless - the editor cannot properly target its various instances without the unique instance ID.