Symfony 2和jQuery mobile 1.1.1 [英] Symfony 2 and jQuery mobile 1.1.1

查看:70
本文介绍了Symfony 2和jQuery mobile 1.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Symfony 2.1和jQuery Mobile 1.1.1创建了一个简单页面.我的整个页面都在防火墙后面.

I have created a simple page using Symfony 2.1 and jQuery Mobile 1.1.1. My whole page is behind a firewall.

登录后,菜单显示良好,但窗口位置栏中的URL为localhost/mobile/web/app_dev.php/loginCheck(这是Symfony的login_check URL).当我使用一个菜单按钮导航到另一个页面时,一切正常,但是当我按下新页面标题中的后退"按钮时,它会尝试返回到loginCheck页面,当然,作为loginCheck会失败是无效的路线.有人遇到过这个问题吗?

After logging in, the menu appears well, but the URL in the window's location bar is localhost/mobile/web/app_dev.php/loginCheck (which is Symfony's login_check URL). When I navigate to another page by using one of my menu buttons, everything goes fine, but when I press the Back button in the new page's header, it tries to go back to the loginCheck page, which, of course, fails, as loginCheck is an invalid route. Has anyone faced this problem before?

推荐答案

我在评论中提到,如果我将表单指定为

As I mention in my comment, if I specify my form as

<form method="post" action="{{ path('login_check') }}" data-ajax="false">

一切正常.我认为,这应该被认为是一种解决方法.

Everything works as expected. This, however, should be considered as a workaround, I think.

这篇关于Symfony 2和jQuery mobile 1.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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