BIND FCKEDITOR on more than one textarea with same name

Last post 05-18-2009 3:31 AM by naspinski. 1 replies.

Sort Posts:

  • BIND FCKEDITOR on more than one textarea with same name

    05-18-2009, 12:26 AM
    • Member
      5 point Member
    • miwasi2002
    • Member since 03-30-2009, 6:38 AM
    • Posts 30

    I want to convert both the textarea with FCKEDITOR functionlaity but only first one is converting to FCKEDITOR and the second one remains the simple textarea  

     

    PLZ NOTE: textArea name should have same name because i m creating text area with some loop

     

     

     

    <
    html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <script type="text/javascript" src="fckeditor/fckeditor.js"></script>

    <script language="javascript">

     

    function doInit() {

    var oFCKeditor = new FCKeditor('tbParamA','450','350','Basic') ;

    oFCKeditor.BasePath = "fckeditor/" ;

    oFCKeditor.ReplaceTextarea() ;

    var ParmA = "Aparm";

    var MyArgs = new Array(ParmA);

    MyArgs = window.dialogArguments;

    //alert(ParmA);

    tbParamA.value = MyArgs[0].toString();

     

    }

    </script>

    </head>

    <body onblur="this.focus" onload="doInit()">

    <table width=100%>

    <tr>

    <td align="center" width=100% >

    <textarea name ="tbParamA" ></textarea></td></tr>

     

    <tr>

    <td align="center" width=100% >

    <textarea name ="tbParamA" ></textarea>

    </td></tr>

    </table>

     

    </
    body>

    </html>

    Filed under:
  • Re: BIND FCKEDITOR on more than one textarea with same name

    05-18-2009, 3:31 AM
    Answer
    • Participant
      929 point Participant
    • naspinski
    • Member since 04-25-2008, 1:12 PM
    • Posts 170

    Doesn't work that way, they shouldn't have the same name - this is invalid, so FCKEditor does not work in your case.  You need to make two different names and bind to each name.

    You can't write bad markup and expect code to deal with it.

    ...for some reason, most people assume that you can't figure out the incredibly difficult 'Mark as Answer' feature...

    I on the other hand, I have faith in you collective Asp.Net forums!

    naspinski.net
Page 1 of 1 (2 items)