Toon posts:

twee maal FCKEditor en AJAX request

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik wil mijn formulier versturen met AJAX. Ik gebruik jQuery. Ik kan één FCKEditor versturen. Echter heb ik twee editors op mijn pagina staan, daar gaat het mis. Ik krijg:
code:
1
FCKeditorAPI.GetInstance("vervolg") is undefined


Aanmaken van mijn twee FCKeditors:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    $sBasePath = "../fckeditor/";

    $oFCKeditor = new FCKeditor('intro') ;
    $oFCKeditor->BasePath   = $sBasePath ;
    $oFCKeditor->Width  = 780;
    $oFCKeditor->Height = 300;
    $oFCKeditor->ToolbarSet = "Beheer";
    $oFCKeditor->Value      = $_POST['intro'];
    $oFCKeditor->Create() ;

    echo "<br /><br /><strong>Inhoud pagina:</strong><br />";
    
    $oFCKeditor2 = new FCKeditor('vervolg') ;
    $oFCKeditor2->BasePath  = $sBasePath ;
    $oFCKeditor2->Width = 780;
    $oFCKeditor2->Height    = 300;
    $oFCKeditor2->ToolbarSet = "Beheer";
    $oFCKeditor2->Value     = $_POST['vervolg'];
    $oFCKeditor2->Create() ;


Mijn (nog heel simpele) AJAX functie:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var intro = escape(FCKeditorAPI.GetInstance('intro').GetXHTML());
var vervolg = escape(FCKeditorAPI.GetInstance('vervolg').GetXHTML());
        
                    var ajaxOpties = 
                    {
                        type: "post",
                        url: "nieuws-toevoegen.php?aktie=opslaan",
                        data: "&titel=" + $("#titel").val() + "&actief=" + $("#actief").val() + "&intro="+intro+"&vervolg="+vervolg,
                        success: function(data) 
                        {
                            alert( "Ik kreeg terug: " + data );
                        }
                    };
                    $.ajax(ajaxOpties);


Kunnen jullie mij op weg helpen?

  • TeeDee
  • Registratie: Februari 2001
  • Laatst online: 16:01

TeeDee

CQB 241

Zo op het eerste gezicht heeft dit niks met 'AJAX' te maken. Bekijk deze resultaten eens.

Heart..pumps blood.Has nothing to do with emotion! Bored


Verwijderd

Topicstarter
Dank voor je reactie. Ik heb even verder gezocht, dit lijkt te werken: http://www.fckeditor.net/...=+firefox+multiple#p32151