Possible Conflicting Callbacks
I'm using this form of callback (aspx page-side code)
==================================
<script>
function CallBackClientSender(varDataString) {
//alert("at callback sender")
var Command = varDataString;
var context = new Object();
context.CommandName = "CallBackClientSender";
<%=CallBackSenderSetupString%>
return
}
function CallBackClientReceiver(varCallBackResult, varContext) {
//alert("at callback receiver")
if (varContext.CommandName == "CallBackClientSender" ) {
//alert("calling client-side router")
CallAndPostBackRouter(varCallBackResult)
return
}
}
function onError(message, context) { // This will occur if there's an exception from the server side
CallBackErrorProcessing(message) } // message will be the exception message
</script>
=================================================
I've got two things going on that use the above mechanism to communicate with the client.
One is a "prompter" in the page-side javascript that does this (next bit of code) repeatedly, basically "pinging" the server for app status info every so often
setTimeout("CallBackClientSender('" + wrkDataString + "')",gvPromptInterval )
The other is a set of buttons/transactions that do callbacks instead of postbacks.
Once in awhile one of the button/transactions will "fail to operate"....the associated highlighting works, so the button isn't dead, but the callback clearly doesn't happen.
I suspect that a "prompter" callback may be happening right then, and the button/transaction call back gets "lost".
I'm looking for a way to keep these two sets of callbacks from getting tangled up with each other.
Any suggestions on how to accomplish this, based on the above mechanism (not ready for AJAX), would be appreciated.
Thanks!
|