Hello.
I have a function that I'm calling several times, and different ID's
are passed in. How do I know which particular ID is being written back
to?
Here's the function in question:
function updateCount(sId) {
new Ajax.Updater(sId, 'http://url'', {
onComplete: function(r) {
if (r.responseText == '-1') {
location.reload(true);
} else if (isNaN(parseInt(r.responseText))) {
// We need to write "0" to the correct DIV!
alert(r.responseText);
}
}
});
}
I have a check in place to determine if the returned result is
numeric, but I need to update the appropriate DIV. The param "sId"
contains the element to be written to, and I need to know where in
prototype this is stored so that I can reference that ID and take the
appropriate action.
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---