SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax doesn't work in Firefox - Forbidden 403 error

    Hi,

    I have a strange problem with my first ajax script. It works fine at localhost in IE6, IE7 and Firefox. When I upload it to the server, it only works in IE6 and IE7 and NOT in Firefox.

    The error I receive is a 403 Forbidden error (You don't have permission to access ... on this server).

    This is the code where it goes wrong:

    Code JavaScript:
    xhr.open('POST', 'ajax/merken.php?aard_id=' + aard_id, 'true');

    Does anybody know this problem and a solution for it?

  2. #2
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using the full url instead of a relative path? That would be the first thing I'd try.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using a Windows Server with built in Authentication?

  4. #4
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ruby-lang View Post
    Have you tried using the full url instead of a relative path? That would be the first thing I'd try.
    Yes, doesn't work. It also a 403 error, not a 404. The script accesses the correct page (checked with firebug).


    Quote Originally Posted by gimbles View Post
    Are you using a Windows Server with built in Authentication?
    No, Linux/Apache

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you actually posting any data, if not change the method to GET, see if that helps

  6. #6
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you access ajax/merken.php with your own browser? Does that give 403 as well?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •