Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    46
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Success / Error, what defines them?

    Hi there!

    I'm a little bit confused (new to Ajax).
    What is it that defines whether the file execution is a success or a fail?
    If I use the 'errorThrown' will the PHP 'die' function call it? if not, what can I execute in PHP to make sure Error gets called when I want it to?
    Regards

    Matthew
    Last edited by GreenFanta; 08-31-2012 at 11:53 PM.

  2. #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    9,893
    Thanks
    6
    Thanked 1,169 Times in 1,140 Posts
    As far as I understand, “success” and “error” are based on the HTTP status codes the server returns. So you’d need to make PHP send an error status code in order to throw an error.

  3. #3
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    6,327
    Thanks
    30
    Thanked 870 Times in 868 Posts
    I don't think you get a ajax type error by using bad php. You will get php type error. If you call a file that don't exist you'll get the ajax type thing.


 

Posting Permissions

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