jQuery移动取消302重定向到外部站点 [英] jquery mobile canceling 302 redirect to external site

查看:244
本文介绍了jQuery移动取消302重定向到外部站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将DotNetOpenAuth与使用jquery mobile的网站集成在一起.我遇到了一个问题,其中jquery mobile似乎取消了到服务器响应的提供方(外部站点)的302重定向.

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.

我尝试在mobileinit事件中使用以下命令关闭默认的jquery移动ajax处理:

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

$.mobile.ajaxEnabled = false;

如果我将jquery mobile移出图片,则302重定向将得到正确处理,并且与提供方的OpenID集成可以正常工作.

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.

有人可以告诉我如何使jquery mobile正确处理302重定向到外部站点的情况吗?

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

推荐答案

对于表单,只需将"data-ajax"属性设置为false.

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

应该是这样的:

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

这将禁用jQuery mobile的默认ajax处理.

This will disable default ajax handling of jQuery mobile.

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

这篇关于jQuery移动取消302重定向到外部站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆