Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-31-2012, 11:51 PM   PM User | #1
GreenFanta
New Coder

 
Join Date: Aug 2011
Posts: 46
Thanks: 9
Thanked 2 Times in 2 Posts
GreenFanta is an unknown quantity at this point
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..
GreenFanta is offline   Reply With Quote
Old 09-01-2012, 01:13 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,596
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 09-01-2012, 08:22 PM   PM User | #3
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,376
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
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.
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:21 PM.


Advertisement
Log in to turn off these ads.