Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2011-08-23 06:19:07

yuccaone
New member
Registered: 2011-01-04
Posts: 6

Xinha post with Mootools

Hi,

I have a simple textarea to use with Xinha.
When I want to post my content (to a php file) with Mootools (v 1.3.2), the post var of my textarea have no content (I have the right var, but without content).

To send my content with Mootools, I use this javascript function :

document.addEvent('domready', function(){
var monForm = $('gestion_parametres_news');
monForm.addEvent('submit', function(e){
e.stop();
monForm.set('send', {
onSuccess : function(responseText, responseXML){
var afficheEtat=$('afficheInfosEtat');
afficheEtat.set('html', responseText);
(function() {
afficheEtat.empty();
}).delay(4000);
}
})
monForm.send();
});
});

And my form :

<form name="gestion_parametres_news" id="gestion_parametres_news" action="./Ajax/gestion_parametres_news.php" method="post" enctype="multipart/form-data">
<input type="hidden" id="dirPointPage" name="dirPointPage" value="../">
<input type="hidden" id="langPage" name="langPage" value="fr">
<input type="hidden" id="modifFontSizePage" name="modifFontSizePage" value="10">
<input type="hidden" id="stylecssPage" name="stylecssPage" value="normal">
<textarea id="editeur" name="editeur" rows="25" cols="50" style="width: 100%"></textarea>
<input type="submit" name="valider" value="Valider" title="Valider" />
</form>


EDIT 1: When I don't call Xinha, I have my content in my php file.

EDIT 2: When I click two times on my submit button, it works, but not the first time

Thanks

Last edited by yuccaone (2011-08-23 07:28:41)

Offline

#2 2011-09-05 19:47:10

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Xinha post with Mootools

You must call the DOM0 onsubmit of the form (ie yourform.onsubmit() ).  Or use yourxinha.getHtml() to get the HTML and add it into the textarea yourself.


James Sleeman

Offline

Board footer

Powered by FluxBB