@relphie, I'm a newb to jQuery and Klaus' UI Tabs script, but I'm
learning very quickly.

I'm very interested in exploring this Really Simple History script
that you referred to in your post.
I think what would trigger the browser to actually "go there" would be
if the RSH script went one step further:

1.) Add a fake URL parameter to the end of the URL (this is the
critical factor, in my experiments):
      a.) If URL does not have a query string, then add "?
historyTimestamp=2009-02-03_12-30-45PM"
      b.) If the URL already has a query string, then simply add
"&historyTimestamp==2009-02-03_12-30-45PM"
2.) Then, add to the URL, the anchor hash value

If I can tear apart the RSH script, I may have a go at it myself.

On Dec 18 2008, 2:06 pm, relphie <relp...@gmail.com> wrote:
> Hello, I was wondering if anyone has successfully combined jQuery ajax
> calls with a browserhistoryplugin.  I have seen lots of older posts,
> and lots of older libraries, but not many examples for a current,
> cross-browser solution.  I have tried using Really SimpleHistory
> (http://code.google.com/p/reallysimplehistory/), and while it does add
> the anchor pages to myhistory, the content remains the same when
> going forward / backward.  I also tried the JSSM plugin (http://
> trac.nathanhammond.com/jssm/), I had to hack it up a little bit since
> it tries to be all-in-one, but I had the same problems with it as with
> RSH (historyis there, but it doesnt do anything).
>
> Thehistoryplugins listed in the jQuery plugins directory I have also
> tried and the are either old, not up-to-date with current browsers, or
> not fully functional.
>
> Does anyone have a working example that they could point me to?  Any
> advice on how to integrate with one of the plugins I mentioned?  Any
> ideas as to why thehistoryis there, but the page content does not
> change?
>
> Here are the ajax calls I would like to create ahistoryfor:
>
> <code>
> function ajaxMenu() {
>         $("#accordion .ui-accordion-data a").click(function(event) {
>                 event.preventDefault();
>                 $(".userTool").html("").append("<div id='loading' 
> class='loading'
> style='margin-top:7em;'><img alt='loading...' src='../images/ajax-
> loader.gif'></div>");
>                 var url = $(this).attr("href");
>                 if(url.indexOf("?") == -1) {
>                         url = url + '?';
>                 } else {
>                         url = url + '&';
>                 }
>                 url = url + 'ajax=true&skipNavigation=true';
>             $.ajax({
>                         url: url,
>                 complete: function(XMLHttpRequest, textStatus) {
>                         
> $(".userTool").replaceWith(XMLHttpRequest.responseText);
>                         $(".filtered",".userTool").columnFilters();
>                 }
>             });
>             $("#accordion .ui-accordion-data a").removeClass("current");
>                 $(this).addClass("current");
>         });}
>
> </code>

Reply via email to