[Javascript] cache ajax
Terry Riegel
riegel at clearimageonline.com
Mon Jan 12 11:31:00 CST 2009
Hello All,
I am getting into a new project and would like to cache my ajax
requests into a global variable.
Any ideas on how I might be able to do this?
I have the following function
function showcat()
{
var category = this.id;
var pars = '?ajaxrequest='+category+'&returndiv=maincategorydiv';
$('maincategorydiv').innerHTML='<img src="/newsite/images/
spinner.gif" width="24" height="24" alt="loading" />';
var myAjax = new Ajax.Updater('maincategorydiv', this.ajax,
{method: 'get', parameters: pars,
onComplete: function(transport){accordion = new
Accordion(category+"-accordion", 3);}
});
}
What I would like to do is set category to the html returned by my
ajax call
prodcat01=returned results
Make sense?
Thanks,
Terry
More information about the Javascript
mailing list