I have this JavaScript code:
function recipient_click(ajaxMgrId, checkBoxId, contactId) {
var chk = $get(checkBoxId);
var mgr = $find(ajaxMgrId);
var args = '';
if (chk.checked) {
args += 'Add:' + contactId;
}
else {
args += 'Remove:' + contactId;
}
mgr.ajaxRequest(args);
}
On the first click of a checkbox, the code works. On the second click, the last line (mgr.ajaxRequest...) fails because mgr is null. The ids of the manager have not changed between calls, but $find() does not work. No exceptions are occurring in the server side code.
Any thoughts on why the Ajax Manager is null on subsequent calls?
Thanks in advance...
function recipient_click(ajaxMgrId, checkBoxId, contactId) {
var chk = $get(checkBoxId);
var mgr = $find(ajaxMgrId);
var args = '';
if (chk.checked) {
args += 'Add:' + contactId;
}
else {
args += 'Remove:' + contactId;
}
mgr.ajaxRequest(args);
}
On the first click of a checkbox, the code works. On the second click, the last line (mgr.ajaxRequest...) fails because mgr is null. The ids of the manager have not changed between calls, but $find() does not work. No exceptions are occurring in the server side code.
Any thoughts on why the Ajax Manager is null on subsequent calls?
Thanks in advance...