[support] Strange AJAX error

Austin Einter austin.einter at gmail.com
Thu Dec 13 02:32:41 UTC 2012


Dear All
I have an auto complete text field , where user types and if corresponding
entry is present in database, I show it to user using below code.

*$matches = array();
  if ($string)
  {
      $result = db_select('resubmt_skill_ids')
        ->fields('skill_ids', array('name', 'id'))
        ->condition('name', db_like($string) . '%', 'LIKE')
        ->range(0, 10)
        ->execute();
      foreach ($result as $skill)
      {
          $matches[$skill->name] = check_plain($skill->name);
      }
  }
  drupal_json_output($matches);
*
Lets say one user wanted to type *.net*, as soon as user types *.n* I get
below error.

*
An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: http://localhost/example.com/util/known/skillsets
StatusText: Forbidden
ResponseText:
403 Forbidden
Forbidden
You don't have permission to access /util/known/skillsets/.n
on this server.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80
*

Can somebody help me why this error comes and how can I avoid it.

Thanks
Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20121213/414b0540/attachment-0001.html 


More information about the support mailing list