CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • postProcess not called on AJAX POST
Pages: [1]

Author Topic: postProcess not called on AJAX POST  (Read 902 times)

Siv

  • I post occasionally
  • **
  • Posts: 94
  • Karma: -17
  • CiviCRM version: 4.6.2
  • CMS version: Drupal 7.44
  • MySQL version: 5.5.24
  • PHP version: 5.3.13
postProcess not called on AJAX POST
June 15, 2011, 02:36:52 am
while submit a form using AJAX with POST method postProcess() function not called. how to solve this?

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: postProcess not called on AJAX POST
June 15, 2011, 02:51:55 am
can you describe you problem functionally? I saw on another post that you want to update contact information, and the easiest way is to use the CiviCRM API (as Xavier mentioned). Is this problem related in any way?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Siv

  • I post occasionally
  • **
  • Posts: 94
  • Karma: -17
  • CiviCRM version: 4.6.2
  • CMS version: Drupal 7.44
  • MySQL version: 5.5.24
  • PHP version: 5.3.13
Re: postProcess not called on AJAX POST
June 15, 2011, 04:02:12 am
I have created a new form for create contact with fields firstname,lastname,email,group name and now it is working fine but while submitting it refreshing the page and create the contact instead submit the form using AJAX (without refreshing the page) and get the response.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: postProcess not called on AJAX POST
June 15, 2011, 05:22:35 am
I still do not understand your problem  ???
Users enter a new contact on a form you have created or do you want to submit the data using AJAX? Are you using the CiviCRM API?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Siv

  • I post occasionally
  • **
  • Posts: 94
  • Karma: -17
  • CiviCRM version: 4.6.2
  • CMS version: Drupal 7.44
  • MySQL version: 5.5.24
  • PHP version: 5.3.13
Re: postProcess not called on AJAX POST
June 15, 2011, 06:04:08 am
using AJAX.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: postProcess not called on AJAX POST
June 15, 2011, 06:22:49 am
So you should use the CiviCRM API to do that. Which one are you using? Does it not perform the create or update, or can you not get the result?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Siv

  • I post occasionally
  • **
  • Posts: 94
  • Karma: -17
  • CiviCRM version: 4.6.2
  • CMS version: Drupal 7.44
  • MySQL version: 5.5.24
  • PHP version: 5.3.13
Re: postProcess not called on AJAX POST
June 15, 2011, 10:21:40 pm
Already there is a class(Default civicrm class) for add contact, i have to use the same class for here for add contact with AJAX POST.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: postProcess not called on AJAX POST
June 16, 2011, 05:59:27 am
You might need to give the actually class & method or URL you are using for your ajax - It should look something like

http://sandbox.civicrm.org/civicrm/ajax/rest?version=3&entity=Contact&action=create

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • postProcess not called on AJAX POST

This forum was archived on 2017-11-26.