Forum » Javascript » tinymce raar probleem

  1. Fifa06

    Ik heb dus een formulier met een <textarea> waar tinymce in moet verschijnen zeg maar.
    Dit is de code die ik gebruik:

    Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    
    <?php
    echo \"
        <script type=\'text/javascript\'>
            $(\'title\').append(\' - Beantwoorden\');
        </script>
    <div id=\'reply\'>
        <form action=\'\' method=\'post\'>
            <table>
                <tr>
                    <td id=\'firstcol\'>Van</td>
                    <td id=\'secondcol\'>\".database::settings(\"siteName\").\" (\".database::settings(\"siteMail\").\")</td>
                </tr>
                <tr>
                    <td>Aan</td>
                    <td>\".ucfirst(
    $row[\'name\']).\" (\".$row[\'from\'].\")</td>
                </tr>
                <tr>
                    <td>Onderwerp</td>
                    <td>
                        <input type=\'text\' name=\'subject\' value=\'\".
    $subject.\"\' />
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td valign=\'top\'>Bericht</td>
                    <td>
                        <textarea class=\'tinymce\'></textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan=\'2\' align=\'right\'>
                        <input type=\'hidden\' name=\'check\' value=\'1\' />
                        <input type=\'submit\' value=\'Bericht versturen\' />
                    </td>
                </tr>
            </table>
        </form>
    </div>\";
    ?>


    Hiermee verschijnt tinymce wel, probleem is echter dat deze veel te breed wordt:


    Ik had eerst geprobeerd de code te kopieƫren uit een pagina waar het vrijwel exact hetzelfde is, dit werkte dus ook op deze manier.
    Vervolgens heb ik het zelf handmatig uitgetypt, met hetzelfde resultaat.

    Ik ben erachter gekomen dat op dit moment de <form> tag het probleem is, zodra ik die weghaal doet ie het naar behoren.
    Dit is natuurlijk niet de bedoeling, die <form> tag moet daar gewoon kunnen staan (dit kan immers ook op andere pagina\'s).

    De uiteindelijke broncode ziet er zo uit:
    Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    
    <!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>
    <html xmlns=\'http://www.w3.org/1999/xhtml\' xml:lang=\'en\' lang=\'en\'>
    <head>
        <meta http-equiv=\'Content-Type\' content=\'text/html; charset=utf-8\' />
        <meta name=\'robots\' content=\'index, follow\' />
        <meta name=\'keywords\' content=\'dispuut, pi, taart, taarten, bakken, bakmiddelen, recepten, biton, utrecht, b.i.t.o.n., maken, creaties, creatief, leden\' />
        <meta name=\'title\' content=\'Chris Jasperse\' />
        <meta name=\'author\' content=\'H.C. Jasperse\' />
        <meta name=\'description\' content=\'Dit is de website van de taartendispuut van studentenvereniging B.I.T.O.N.\' />
        <title>Dispuut Pi</title>

        <link rel=\'shortcut icon\'       href=\'http://pi.c-vizion.nl/images/template/favicon.png\' type=\'image/x-icon\' />
        <link   type=\'text/css\'         href=\'http://pi.c-vizion.nl/css/template.css\' rel=\'stylesheet\' />
        <link   type=\'text/css\'         href=\'http://pi.c-vizion.nl/css/lightbox.css\' rel=\'stylesheet\' />
        <link   type=\'text/css\'         href=\'http://pi.c-vizion.nl/css/mailManagement.css\' rel=\'stylesheet\' />
        <script type=\'text/javascript\' language=\'javascript\' src=\'http://code.jquery.com/jquery-latest.min.js\'></script>
        <script type=\'text/javascript\' language=\'javascript\' src=\'http://pi.c-vizion.nl/include/jquery.autocomplete.min.js\'></script>
        <script type=\'text/javascript\' language=\'javascript\' src=\'http://pi.c-vizion.nl/include/jquery.table.addrow.js\'></script>

        <script type=\'text/javascript\' language=\'javascript\' src=\'http://pi.c-vizion.nl/include/tiny_mce/jquery.tinymce.js\'></script>
        <script type=\'text/javascript\' language=\'javascript\' src=\'http://pi.c-vizion.nl/include/jquery.lightbox-0.5.min.js\'></script>
        <script type=\'text/javascript\' language=\'javascript\' src=\'http://pi.c-vizion.nl/include/functions.php\'></script>
        <script type=\'text/javascript\' language=\'javascript\'>
    $().ready(function(){
                // TinyMCE
                $(\'textarea.tinymce\').tinymce({
                    // Location of TinyMCE script
                    script_url : \'http://pi.c-vizion.nl/include/tiny_mce/tiny_mce.js\',

                    // General options
                    theme : \'advanced\',
                    plugins : \'pagebreak,style,layer,advlink,inlinepopups,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,advlist\',
        
                    // Theme options
                    theme_advanced_buttons1 : \'bold,italic,underline,strikethrough,|,fontsizeselect,|,removeformat,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,cleanup\',
                    theme_advanced_buttons2 : \'\',
                    theme_advanced_toolbar_location : \'top\',
                    theme_advanced_toolbar_align : \'left\',
                    theme_advanced_statusbar_location : \'none\',
                    theme_advanced_resizing : false,
                    width : \'570\'
                });
                
                // Gives columns the same height
                var colheight = 0;
                $(\'.item\').each(function(){
                    if($(this).height()>colheight){
                        colheight=$(this).height();
                    }
                }).css({height:colheight});
                
                // Temporary value for searchfield
                $(\'input#search\').ready(function(){
                    if($(\'input#search\').val() == \'\'){
                        $(\'input#search\').val(\'Typ uw zoekterm...\');
                        $(\'input#search\').css(\'color\', \'#534937\');
                    }
                    $(\'input#search\').click(function(){
                        $(this).val(\'\');
                        $(this).css(\'color\', \'#000000\');
                    });
                    $(\'input#search\').blur(function(){
                        if(this.value == \'\'){
                            $(this).val(\'Typ uw zoekterm...\');
                            $(this).css(\'color\', \'#534937\');
                        }
                    });
                })
                
                // Lightbox
                $(function(){
                    $(\'a.gallery\').lightBox();
                });// Delete Mail
    $(\".delete\").click(function(){
        message = \'Weet u zeker dat u deze mail wilt verwijderen?\';
        if(confirm(message)){
            delid = $(this).attr(\"name\");
            $.ajax({
                type: \"POST\",
                data: \"delid=\" + delid,
                url: \"/pages/mailManagement/ajax.deleteMail.php\",
                success: function(msg){
                    data = JSON.parse(msg);
                    alert(data.msg);
                    if(data.location != \'\'){
                        window.location = data.location;
                    }
                }
            });
        }
    });
            });
        </script> 
    </head>
    <body>
        <div class=\'PageBackgroundSimpleGradient\'></div>
        <div class=\'PageBackgroundGlare\'>

            <div class=\'PageBackgroundGlareImage\'></div>
        </div>
        <div id=\'container\'>
            <div id=\'logo\'>
                <a href=\'http://pi.c-vizion.nl/\'>
                    <img src=\'http://pi.c-vizion.nl/images/template/logo.png\' alt=\'logo\' />
                </a>
            </div>
            <div id=\'content\'>

                <div id=\'headerImg\'>
                    <img src=\'http://pi.c-vizion.nl/images/template/headerIMG.png\' alt=\'image\' />
                </div>
                <div id=\'text\'>
        <script type=\'text/javascript\'>
            $(\'title\').append(\' - E-mail beheer\');
        </script>
        <div id=\'mailManagement\'>
            <h1>E-mail beheer</h1>
            <ul id=\'submenu\'>

                <li><a href=\'http://pi.c-vizion.nl/mail-management\'>Inbox <b>(4)</b></a></li>
            </ul>
            <div class=\'clear\'></div>
        <script type=\'text/javascript\'>
            $(\'title\').append(\' - Beantwoorden\');
        </script>
    <div id=\'reply\'>
        <form action=\'\' method=\'post\'>
            <table>
                <tr>

                    <td id=\'firstcol\'>Van</td>
                    <td id=\'secondcol\'>Dispuut Pi (test@mail.nl)</td>
                </tr>
                <tr>
                    <td>Aan</td>
                    <td>Blaat (no@spam.org)</td>
                </tr>

                <tr>
                    <td>Onderwerp</td>
                    <td>
                        <input type=\'text\' name=\'subject\' value=\'RE: test\' />
                        &nbsp;
                    </td>
                </tr>
                <tr>

                    <td valign=\'top\'>Bericht</td>
                    <td>
                        <textarea class=\'tinymce\'></textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan=\'2\' align=\'right\'>
                        <input type=\'hidden\' name=\'check\' value=\'1\' />

                        <input type=\'submit\' value=\'Bericht versturen\' />
                    </td>
                </tr>
            </table>
        </form>
    </div></div>
                </div>
            </div>
            <div id=\'sidebar\'>

            <div class=\'Block\'>
                 <div class=\"Block-tl\"></div>
                            <div class=\"Block-tr\"></div>
                            <div class=\"Block-bl\"></div>
                            <div class=\"Block-br\"></div>
                            <div class=\"Block-tc\"></div>
                            <div class=\"Block-bc\"></div>
                            <div class=\"Block-cl\"></div>
                            <div class=\"Block-cr\"></div>

                            <div class=\"Block-cc\"></div>
                <div class=\'Block-body\'>
                    <div class=\'BlockHeader\'>
                        <div class=\'l\'></div>
                        <div class=\'r\'></div>
                        <div class=\'header-tag-icon\'>
                            <div class=\'t\'>Menu</div>
                        </div>

                    </div>
                    <div class=\'BlockContent\'>
                        <div class=\'BlockContent-body\'>
                            <div class=\'item-list\'>
                                <ul>
                                    <li><a href=\'http://pi.c-vizion.nl/\'>Home</a></li>
                                    <li><a href=\'http://pi.c-vizion.nl/news\'>Nieuws</a></li>
                                        <li><a href=\'http://pi.c-vizion.nl/recipes\'>Recepten</a></li>

                                        <li><a href=\'http://pi.c-vizion.nl/materials\'>Materialen</a></li>
                                    <li><a href=\'http://pi.c-vizion.nl/news/view/8\'>Over Pi</a></li>
                                    <li><a href=\'http://pi.c-vizion.nl/news/view/9\'>Het bestuur</a></li>
                                    <li><a href=\'http://pi.c-vizion.nl/links\'>Links</a></li>
                                    <li><a href=\'http://pi.c-vizion.nl/contact\'>Contact</a></li>
                                </ul>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class=\'Block\'>
                 <div class=\"Block-tl\"></div>
                            <div class=\"Block-tr\"></div>
                            <div class=\"Block-bl\"></div>

                            <div class=\"Block-br\"></div>
                            <div class=\"Block-tc\"></div>
                            <div class=\"Block-bc\"></div>
                            <div class=\"Block-cl\"></div>
                            <div class=\"Block-cr\"></div>
                            <div class=\"Block-cc\"></div>
                <div class=\'Block-body\'>
                    <div class=\'BlockHeader\'>
                        <div class=\'l\'></div>

                        <div class=\'r\'></div>
                        <div class=\'header-tag-icon\'>
                            <div class=\'t\'>Zoeken</div>
                        </div>
                    </div>
                    <div class=\'BlockContent\'>
                        <div class=\'BlockContent-body\'>
                            <form action=\'\' method=\'post\'>

                                <input type=\'text\'  name=\'globalSearch\' value=\'\' id=\'search\' />
                                <input type=\'image\' src=\'http://pi.c-vizion.nl/images/icons/search.png\' title=\'Zoeken\' alt=\'Zoeken\' />
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class=\'Block\'>
                     <div class=\"Block-tl\"></div>

                            <div class=\"Block-tr\"></div>
                            <div class=\"Block-bl\"></div>
                            <div class=\"Block-br\"></div>
                            <div class=\"Block-tc\"></div>
                            <div class=\"Block-bc\"></div>
                            <div class=\"Block-cl\"></div>
                            <div class=\"Block-cr\"></div>
                            <div class=\"Block-cc\"></div>
                    <div class=\'Block-body\'>

                        <div class=\'BlockHeader\'>
                            <div class=\'l\'></div>
                            <div class=\'r\'></div>
                            <div class=\'header-tag-icon\'>
                                <div class=\'t\'>Welkom Nigel</div>
                            </div>
                        </div>
                        <div class=\'BlockContent\'>

                            <div class=\'BlockContent-body\'>
                                 <div class=\'item-list\'>
                            <ul>
                                <li><a href=\'http://pi.c-vizion.nl/profile\'>Mijn gegevens</a></li>
                                <li><a href=\'http://pi.c-vizion.nl/profile-edit\'>Mijn gegevens wijzigen</a></li>
                                <li><a href=\'http://pi.c-vizion.nl/myrecipes\'>Mijn recepten</a></li>
                                <li><a href=\'http://pi.c-vizion.nl/mymaterials\'>Mijn materialen</a></li>

                                <li><a href=\'http://pi.c-vizion.nl/logout\'>Uitloggen</a></li>
                            </ul>
                        </div>
                            </div>
                        </div>
                    </div>
                </div>
                    <div class=\'Block\'>

                         <div class=\"Block-tl\"></div>
                            <div class=\"Block-tr\"></div>
                            <div class=\"Block-bl\"></div>
                            <div class=\"Block-br\"></div>
                            <div class=\"Block-tc\"></div>
                            <div class=\"Block-bc\"></div>
                            <div class=\"Block-cl\"></div>
                            <div class=\"Block-cr\"></div>
                            <div class=\"Block-cc\"></div>

                        <div class=\'Block-body\'>
                            <div class=\'BlockHeader\'>
                                <div class=\'l\'></div>
                                <div class=\'r\'></div>
                                <div class=\'header-tag-icon\'>
                                    <div class=\'t\'>Administrator</div>
                                </div>
                            </div>

                            <div class=\'BlockContent\'>
                                <div class=\'BlockContent-body\'>
                                    <div class=\'item-list\'>
                                        <ul>
                                            <li><a href=\'http://pi.c-vizion.nl/article-management\'>Artikelbeheer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/user-management\'>Gebruikershebeer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/recipe-management\'>Receptenbeheer</a></li>

                                            <li><a href=\'http://pi.c-vizion.nl/material-management\'>Materialenbeheer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/ingredient-management\'>Ingredi&euml;ntenbeheer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/unit-management\'>Eenhedenbeheer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/link-management\'>Linkbeheer</a></li>
                                            <li><a href=\'http://pi.c-vizion.nl/mail-management\'>Inbox <b>(4)</b></a></li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
            </div>
            <div class=\'clear\'></div>
            <div id=\'footer\'>

                <hr />
                &copy; Dispuut pi (&pi;) | Alle rechten voorbehouden | 2010 - 2011
            </div>
        </div>
    </body>
    </html>



    Ik zal vast iets heel simpels over het hoofd zien op dit moment, maar ik kom er niet achter wat er nu fout aan is.
    Heeft iemand hiervoor de oplossing?

    Groeten,
    Chris

    Bewerkt door Fifa06 op vr 28-01-2011 om 16:43
    vr 28-01-2011 om 16:40
Reacties (2)

Reageren
  1. Roboo

    Code
    1
    
    <textarea class=\'tinymce\' style=\'width:500px;\'></textarea>



    Probeer dat eens


    3 Maanden lang gratis webhosting uitproberen?

    Vusam Webhosting
    vr 28-01-2011 om 18:03
  2. Fifa06

    Quote: roboo

    [..]

    Probeer dat eens


    Helaas... ook niet

    vr 28-01-2011 om 21:14
Reageren