Gmail like URL scheme

前端 未结 7 929
南笙
南笙 2021-02-05 21:51

I am working on a ticket system, having the following requirement:
The home page is divided into two sections:
Sec-1. Some filter options are shown here.(like closed-tic

相关标签:
7条回答
  • 2021-02-05 22:08

    This is somewhat of a simple answer, but what you want to look at is using a hidden iframe method for your AJAX, as opposed to XHR (XMLHttpRequest Object). This will allow for the browser to maintain the history, so your back buttons will continue to work.

    Some more: http://ajaxpatterns.org/IFrame_Call

    0 讨论(0)
  • 2021-02-05 22:09

    Ben Alman has built a full-featured jQuery plugin for this called BBQ. IMO, it's much better than the Address plugin.

    0 讨论(0)
  • 2021-02-05 22:11

    Yeah--you're headed in exactly the right direciton, and there's a ton of work that has gone into doing this correctly across all browsers and OSes. One of the hardest parts to get right is enabling the browser's back and forward buttons to work correctly when you're using that #urlfragment syntax.

    A library that provides support for such a thing: http://developer.yahoo.com/yui/history/

    0 讨论(0)
  • 2021-02-05 22:12

    Using the yui library for history is an option as mentioned in sblom's comment. You may want to consider just providing a bookmark or link button on your page that user's can click on to get to the urk if you do not want to deal with cross browser compatibility issues.

    We do it here http://connect.garmin.com/explore#sortField=relevance&currentPage=1 Theres a link on the top of the map.

    0 讨论(0)
  • 2021-02-05 22:17

    I find the google wave app's solution to be quite elegant. It's basically what you describe using a parseable url fragment. like so: http://some.domain/some/url/#filters(filter1:key1,filter2:key2);someOtherfragment;andAnotherFragment

    0 讨论(0)
  • 2021-02-05 22:17

    Well if you are using jQuery there is this lovely library by Asual: jQuery Address for deep linking. They have a good API reference, and examples. It will give you all the tools you need to implement your app.

    0 讨论(0)
提交回复
热议问题