开发者

jQuery Mobile URLs are not updated

开发者 https://www.devze.com 2023-04-08 03:29 出处:网络
I am using jquery mobile and am finding the when i redirect users to new forms the urls are not updated correctly.I recognize that there is some ajax operations going on however, the ulrs are still no

I am using jquery mobile and am finding the when i redirect users to new forms the urls are not updated correctly. I recognize that there is some ajax operations going on however, the ulrs are still not being updated when i disable ajax form submits and/or links.

The following js is placed above the link to the mobile-1.0b3.min.js

It is almost like the开发者_Python百科 following is not making any difference.

    <script type="text/javascript">

    //http://jquerymobile.com/demos/1.0a3/#docs/api/globalconfig.html
    $(document).bind("mobileinit", function () {
        //apply overrides here
        $.mobile.ajaxLinksEnabled = false;
        $.mobile.ajaxFormsEnabled = false;
        //$.mobile.defaultTransition = false;
        //$.mobile.loadingMessage = "loading3";
        //$.mobile.pushStateEnabled = true;
    });

</script>

I have found that only if i disable ajax completely do the urls stay current to the page that the user is on.i.e.

$.mobile.ajaxEnabled = false;


I've been bothered by this for weeks now. I posted a similar question here, and put an answer on it for what works for me...

jQuery Mobile/MVC: Getting the browser URL to change with RedirectToAction


1) $.mobile.ajaxEnabled = false; for everything after beta 1.

2) The url will only change if the redirect is done on the client side. I've been having this problem as well so when find a good workaround for it I will let you know (I am assuming that you're trying to do a response.redirect("target") in your code instead of attaching it to a button click event, if it isn't working on button click then I don't know if I can help you).

0

精彩评论

暂无评论...
验证码 换一张
取 消