Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery mobile canceling 302 redirect to external site

I'm trying to integrate DotNetOpenAuth with a site that uses jquery mobile. I'm running into an issue where jquery mobile appears to be canceling a 302 redirect to the providing party (an external site) that the server is responding with.

I've tried turning off the default jquery mobile ajax handling with the following in the mobileinit event:

$.mobile.ajaxEnabled = false;

If I take jquery mobile out of the picture the 302 redirect is handled correctly and the OpenID integration with the providing party works fine.

Can anyone tell me how to make jquery mobile correctly handle the 302 redirect to an external site?

like image 657
joshb Avatar asked Oct 09 '11 01:10

joshb


2 Answers

For forms just set "data-ajax" attribute to false.

It should be like this:

<form action="postthis" method="post" data-ajax="false">

This will disable default ajax handling of jQuery mobile.

Reference: http://jquerymobile.com/test/docs/forms/forms-sample.html

like image 121
Korayem Avatar answered Oct 01 '22 02:10

Korayem


I had the same problem and was able to login after adding rel="external" to the login link, see example below

<a href="/authentication/logon" rel="external" data-icon="gear" class="ui-btn-right">Login</a>

I'm not sure if this is the solution you are looking for?

like image 41
orjan Avatar answered Oct 01 '22 02:10

orjan