Magnific-Popup
Magnific-Popup copied to clipboard
ajax load results in 404 error
Hello my Ajax call results in a 404 error - obviously my url is wrong - what I was wondering though is how to catch this error and maybe show an error message in the popup.
thanks
How are you performing your request? If you're using jQuery, it has a fail() function for handling anything that isn't a success state code (including redirects). See https://api.jquery.com/deferred.fail/ and https://api.jquery.com/jQuery.get/ for some examples.
I just set the type argument to "ajax" - something like $( '.container' ).magnificPopup({type: 'ajax', delegate: 'selector')} - still don't understand how I could catch a 404
On Sun, Dec 11, 2016 at 4:34 PM, Tieson Trowbridge <[email protected]
wrote:
How are you performing your request? If you're using jQuery, it has a fail() function for handling anything that isn't a success state code (including redirects). See https://api.jquery.com/deferred.fail/ and https://api.jquery.com/jQuery.get/ for some examples.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dimsemenov/Magnific-Popup/issues/931#issuecomment-266317079, or mute the thread https://github.com/notifications/unsubscribe-auth/ABe4lL40jso8Zy_2icle4NxD0enBzzHaks5rHIh5gaJpZM4LKDX1 .
-- Marco M. Jaeger http://net4visions.com
4 yrs later, I need this too...