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) »
  • Ajax urls
Pages: [1]

Author Topic: Ajax urls  (Read 895 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Ajax urls
April 02, 2009, 06:37:16 pm
Hi

I started talking to Lobo about the url creation in this post not working:

http://civicrm.org/node/528

He said the format should be

<dlobo>:
Quote
change this: crmURL p='civicrm/ajax/rest?fnName=civicrm/contact/search&json=1&contact_type=Organization&return[sort_name]=1&group=4&return[country]'}
to
crmURL p='civicrm/ajax/rest' q='fnName=civicrm/contact/search&json=1&contact_type=Organization&return[sort_name]=1&group=4&return[country]'}

but it still doesn't work - I get it translated to

 http://localhost/classes2.2/index.php?q=civicrm/ajax/rest&amp;fnName=civicrm/contact/search&amp;json=1&amp;contact_type=Organization&amp;return[sort_name]=1&amp;return[country]&s=b&limit=10&timestamp=1238721767431&sort_name=%25b

 If I go through & change all &amp; to & it works
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

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ajax urls
April 02, 2009, 08:07:44 pm

to avoid the html encoding of the & use h=0, i.e.

Code: [Select]
{crmURL p='civicrm/ajax/rest' q='fnName=civicrm/contact/search&json=1&contact_type=Organization&return[sort_name]=1&group=4&return[country]' h=0}

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Ajax urls

This forum was archived on 2017-11-26.