sudhakarkva
01-28-2009, 04:23 PM
Hi Friends,
My Problem is to send the value of one ajax updater to next ajax updater
this is my ajax code
new Ajax.Updater('pubListCount', 'DeletePublication.action', {
onSuccess: function() {
setSelectedTo(false);
new Ajax.Updater('resultContainer', 'ManagePaginationPublications.action', {
onComplete: function() {
document.getElementById('workingStatus').style.display = 'none';
var topElement = document.getElementById("cout");
var bottomElement = document.getElementById("bottomCout");
topElement.innerHTML = "<span class='text-no-border'>" + totalSelected + " item(s) deleted from the List </span>"
bottomElement.innerHTML = "<span class='text-no-border'>" + totalSelected + " item(s) deleted from the List </span>"
}, parameters:Form.Methods.serialize(document.forms["publicationForm"])
});
}, parameters:Form.Methods.serialize(document.forms["publicationForm"])
});
In the above code there are two updaters of ajax
when i call first ajax i am setting value say like "setName("Sudahkar")" in the action class
now my problem is how to send the this value name to next ajax updater as parameter there is any way...
in the next ajax call i am making the action call and in that also i have setters and getters for "Name" so i need to set this name there how..
urgent frinds
is there any other way i can improve my code plx tell me friends..
bye
thx for help..
My Problem is to send the value of one ajax updater to next ajax updater
this is my ajax code
new Ajax.Updater('pubListCount', 'DeletePublication.action', {
onSuccess: function() {
setSelectedTo(false);
new Ajax.Updater('resultContainer', 'ManagePaginationPublications.action', {
onComplete: function() {
document.getElementById('workingStatus').style.display = 'none';
var topElement = document.getElementById("cout");
var bottomElement = document.getElementById("bottomCout");
topElement.innerHTML = "<span class='text-no-border'>" + totalSelected + " item(s) deleted from the List </span>"
bottomElement.innerHTML = "<span class='text-no-border'>" + totalSelected + " item(s) deleted from the List </span>"
}, parameters:Form.Methods.serialize(document.forms["publicationForm"])
});
}, parameters:Form.Methods.serialize(document.forms["publicationForm"])
});
In the above code there are two updaters of ajax
when i call first ajax i am setting value say like "setName("Sudahkar")" in the action class
now my problem is how to send the this value name to next ajax updater as parameter there is any way...
in the next ajax call i am making the action call and in that also i have setters and getters for "Name" so i need to set this name there how..
urgent frinds
is there any other way i can improve my code plx tell me friends..
bye
thx for help..