Thank you Klaus. All my major issues have been solved including writing a
pagination model on top of it and handling the highlighting of the active
link (refresh wasn't being taken care of by your library).

So, only one thing remains - the double request that sometimes happens and
once it happens then it always happens. I saw the link (comment from your
blog) for the change. But, its confusing and requires lot of changes.

I am hoping you can release a patch soon.

Thank you,
Mandy.


On 5/25/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:


Mandy Singh wrote:
> Hi Klaus,
>
> Thanks for sending that link across. I will take a look into it.
>
> However, do you have any pointers to my other question?
> {If you land on the page with your remote div populated with the first
> result directly from the backend, then click on 2nd link and populate
> results in the remote div, then click back, now remore div is empty. It
> only happens with the default case, ie, if you click on 2nd link, then
> 3rd link, then click back you come to 2nd link related content
> correctly, but now clicking back leads into an empty div. That's
> probably because history isn't triggered by default when you just come
> to the page?}

You can pass a callback to the initialize function that is called if you
push the back button to the point where the browser's address contains
no fragment identifier/hash.

By default the containers is emptied in that case, but passing the
callback will overwrite the default. In your case you'd need to pass a
function that either loads content from the first container remotely or
gets it elsehow from cache (capture it on page load with the already
existent content).

$.ajaxHistory.initialize(function() {
    // load first container content
});

But usually this is not required, because you could as well include a
hash in the url, that triggers loading of the first container:

http://whatever.com/#remote-1


-- Klaus

Reply via email to