> Another option could be a modified error callback and actually have it > work like this: > > $.get("someurl", function(data, errorMessage){ > if ( data ) { > // got results > } else { > // got error > alert( errorMessage ); > } > }); > > Thoughts on this?
This one looks cleaner to me; and it certainly seems nicer than expecting the user to do "if ( typeof data === 'string' )" Nothing would be be passed as a second parameter on success, right? I like it. -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.