Using values passed through AJAX

Giganews Newsgroups
Subject: Using values passed through AJAX
Posted by:  Matthew White (mgw8…
Date: Wed, 26 Mar 2008


I have an AJAX website that call on a PHP page to tell it how to handle the
back/forward buttons.  This involves sending a user id (randomly created at
the start of the session) and a variable that tells PHP what page to look
for in the history.  This is the code (using Mootools):

function retrievehistory(userid, location){
    var params = Object.toQueryString({id: userid, pageid: location,
    var myAjax = new Ajax("history.php", {method: 'post', data: params, update:

The history.php page sends back the address of the page you were last on.
How do I use this value?  It needs to take the value and then submit that to
another function that load the page.  If anyone can find a way to process
that information using either Mootools or Dojo or plain Javascript, I would
be appreciative.

Thanks in advance,
Matthew White