I cannot seem to access the context object using a loop context is set: var context = [id1, id2, id3];
This callback function works:
function OnChangeSucceeded(result, context, methodName) { document.getElementById(context[0]).disabled = result; document.getElementById(context[1]).disabled = result; document.getElementById(context[2]).disabled = result; }
This callback function fails:
function OnChangeSucceeded(result, context, methodName) { for(var indx = 0; indx < context.length; indx++) { document.getElementById(context[indx]).disabled = result; } }
Thats for the pointer to firebug tvanfosson.
I have redone the function and it now works as:
I am not sure if it was because the context was original created as:
which I have now replaced with: