AJAX Submission with mootools

copiermad 17 Oct, 2008
Hi,

Sorry if this is the wrong place to post, or the issue has been posted before, but my searches failed to find an answer.

My requirement is to be able to have a chronoform submitted via AJAX using mootools. I have used prototype.js before so the transition to mootools should be easy, but how do I override the chronoforms FORM ACTION so that ajax takes over and submits correctly? Would I have to override the action within mootools and receive the response using responsetext?

Hope this makes sense.

:)
GreyHead 17 Oct, 2008
Hi copiermad,

What do you need to change the form Action to? You can switch between Get & Post in the General tab, I don't know enough about AJAX to know what you need here.

Bob
Max_admin 17 Oct, 2008
Hi copiermad,

just make an input of type button and make it execute a function on click event which is submitting the form, I think something like :

function submitform(){
  $('ChronoContact_formname').send({
    onRequest: function(){
      $('ChronoContact_formname').innerHTML = "Please wait, form submission in progress.......";
    },
    onComplete: function(){
      $('ChronoContact_formname').innerHTML = "Thank you!<br>"+this.response.text;
    }
  });
}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.