In an application where I am making cross-domain JSONP requests (using jQuery), when the browser makes the first jsonp request, it pops up a dialog for basic authentication, because that is what the target server requires. I would instead like to trap the event and bring up a dialog with a logon page from the server hosting the resource to establish authentication.
How can I do this?
In an application where I am making cross-domain JSONP requests (using jQuery), when the
Share
I agree with Adeel… it can’t be trapped.
However, you can supply the required authentication header manually – to prevent the prompt from ever appearing – if the user has already “logged in” and you know their un/pw on the client side.