Hello
Just thought I would share my workaround for creating multiple editors with the same name.
On each page there can be any number of text editors which all need to return the same post variable i.e. feedback.
I couldn't find an inbuilt function to do this so I just typed the following instead of using the function to create the textarea:
<div><input type="hidden" id="feedback<%=groupCommentID%>" name="feedback" value="<%=feedback%>" style="display:none" /><input type="hidden" id="feedback<%=groupCommentID%>___Config" value="" style="display:none" /><iframe id="feedback<%=groupCommentID%>___Frame" src="../FCKeditor/editor/fckeditor.html?InstanceName=feedback<%=groupCommentID%>&Toolbar=Default" width="100%" height="400" frameborder="0" scrolling="no"></iframe></div>
Please tell me if there is another more elegant way of doing this. This method also generates various javascript errors about FCKEditor being undefined.
This way the id of each text box is diferent but the name returned is the same.
I tried the new javascript method ReplaceAllTextAreas but this could not handle the fact that there were multiple forms on the page with a textarea named the same.
Also to fix the bug with hidden textareas not returning a post value (viewtopic.php?f=6&t=8680) I set the value to if it was empty.
Robin
Mon, 03/03/2008 - 13:16
#1
Re: Dynamically Creating Multiple Editors - Unelegant Workaround
Is there any better way of doing this?
Thanks
Robin