Hi. I am having problems with my cookies using ajax.
when i call get_cookie, it seems i am getting the assigned cookie
before the call to the server, and not after. I am wondering if
somebody
has encountered this and knows of a solution.

the code is thus:

getInfo_callback(res) {

var ds = res.value;

//code to run through the database and get
//values min and max

//then, assign values from DB to doc.cookie:

document.cookie = "min = "+min+";";
document.cookie = "max = "+max+";";

}

then, the following method calls the method on the server:

function getInfo() {

        try {
            var respo = my_home.my_cal.getInfo(getInfo_callback);
        } // end try

        catch(e){alert("getInfo() error: " + e.description);} // end
catch

        return respo;

}

finally, a function further down on the page attempts to manipulate the

cookie values:

fetchCookies(){

var mi = get_cookie('min');
var ma = get_cookie('max');

//do something with mi and ma.

}

THE PROBLEM IS that whenever fetchCookies() is called, it returns the
"previously fetched min and max values", not the values that should be
returned for the clicked on item. I experimented with alerts and if i
alert document.cookie at getInfo_callback, the correct min/max values
are returned. But, if i do the same thing at getInfo(), the previous
values are returned. So, something is happening between the client and
server that is causing a delay in returned values.

Any ideas???? please help... this is slowing me down.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to