[jQuery] History plugin? AJAX-filled DropDowns are emtpy after using Back-button of browser

2009-06-25 Thread DigitalDude

Hey,

I think my first post was erased, so I will give it another try...

Scenario:
2 Dropdowns which depend on one another, user selects from first
dropdown (for example, country). Then an AJAX call is made and the
secon dropdown is poluated with the Country-related locations. The
User selects the location, and then he clicks on submit and is taken
to antoher page.

When I now hit the Browser's Back button, the dropdowns are empty,
the data and the preselection are erased.

So I need a way to save the data, so the user can go back with the
browser and has his preselected data in the dropdowns.

I would be very happy if someone could give me a simple example to
save the data from one dropdown, and i will try to adapt this to the
other dropdowns and maybe other elements in the future. Please help
me, it is very important!

Thanks in advance,

DD


[jQuery] History and ajax has me stuck

2009-06-16 Thread Bruce MacKay

Hi folks,

I'm having difficulty understanding how to get Klaus's history plugin 
working in my application.I have an ebook application in which 
the page has a static index of pages which, when an individual link 
is clicked, a file is loaded into an adjacent div (#ebook).


Upon being loaded, the file is scanned and any a.linkto tags are 
scanned for as these tags are my between page links which I was 
hoping to get the history plugin to capture and do its magic.  Once 
found, the a.linkto tags are prepared - as far as I can understand - 
for the history plugin.  However, my attempt has gone all pear-shaped 
and I cannot find any reference/article/documentation via Google to 
help me see my error.


What tends to happen is that upon clicking an a.link from within 
#ebook, a copy of the entire current page, sans the targetted page, 
is loaded into #ebook.


Any help would be appreciated - even if it is a suggestion to try a 
different approach.


Thanks, Bruce

$(document).ready(function() {
$.ajaxHistory.initialize();
var pgname = $('a.eb0').attr('id');
fnGetEbookFile(pgname);
});

function fnGetEbookFile(pgname){
$.get('textfiles/' + pgname + '.html?q=' + new 
Date().getTime(),function(txt){

$(#ebook).html(txt).show();
$('a').each(function() {
var $a = $(this);
var theid = $a.attr('id');
var q = $a.attr('class');
if (q=='linkto') {
$a.attr(id,'#textfiles/' + theid + 
'.html').remote('#ebook').bind(click,function() 
{fnGetEbookFile(theid);});

};
});
});
}; 

[jQuery] History with Ajax

2008-11-17 Thread [EMAIL PROTECTED]

I'm using this plugin http://plugins.jquery.com/node/2472 to manage
history
in Ajax
I've changed the line code
$([EMAIL PROTECTED]'history']).click(function(){
by
$j('body').intercept('click', [EMAIL PROTECTED]'history'], function(e){
it works perfectly in Firefox i still have the problem using IE7 could
you
Helps please thinks


[jQuery] history in ajax and setting the ajax url

2007-04-27 Thread xavier

Hello,

I want to have an application that works both with and without ajax.
Eg: without ajax, I get /contentWithMenu and with ajax I .load /
contentonly into #content

  jQuery([EMAIL PROTECTED]/]).bind(click,function(){
jQuery(#main).load (/xajax/+this.pathname,{},function()
{this.style.opacity=1;}).fadeTo(slow,0.1);
return false;
});

I want to add that call to the history, so back and bookmarks work.

I'm looking at http://www.stilbuero.de/jquery/history/ and I don't
find a way to have separate urls for the normal link and for the ajax
one. I'm always tempted to blame the lack of documentation or feature
before having to admit that I'm blind, but feel free to fire ;)

What I would like to have is a method to call from the click event to
add an #hash on the history, and a callback that I can customise so I
can load whatever needed based on the hash.

Does it make sense ? Is there a doc on the history plugin I missed or
another plugin that I missed ?

On the other history solutions I found (outside of jquery), you needed
to install an empty html that would be used with a iframe.Is it the
same here ?

Thanks in advance,

Xavier