hey hamburger.... i think you just want to use
http://mootools.net/docs/core/Request/Request
it'll be something like
var req = new Request({
url: "autofocus.php",
data:document.id('comment_form'),
method: 'post',
onSuccess: function(resp) {
// stuff you want to do if it works
}.bind(this),
onFailure: function(err) {
// stuff you want to do if it fails
}.bind(this)
})
req.send()
assuming you have a button which tellls you to send the form you´ll
have to catch the click and stop it from doing its normal
thing...before using the above code
On Aug 16, 1:01 pm, hamburger <[email protected]> wrote:
> Hello, how can i send a request with data and the form-content.
>
> my form is:<form id="comment_form" method="post"
> action="autofocus.php" >
>
> i have the following js:
> SubmitRequest.send({
> data: {
> 'commentToId' :
> this.getParent('li').get('id').split('-')[1].toInt(),
> 'id': bildID,
> 'ajax': 'updateComment'
> }
> }); //}).post($('comment_form'));
>
> i expected to add this }).post($('comment_form')); on last line but i
> get an error.
>
> what is the right syntax?