I’m getting an alert popping up only in Chrome (not Firefox or IE, don’t know about safari) that says,
“Unexpected status code, cannot process hyperevent (0)”
This occurs right before I redirect to a new page at the end of a save method. The really weird thing is that I only get this alert when saving new objects and only on this particular page. I have other pages that save new things and those are fine. Also, it does save the object and the next page displays correctly.
I read the thread from January and I made sure that I give my server side method a return value. I don’t override the onloadhandler and my method doesn’t throw an exception, just this alert box.
Any ideas?
Orion
ClientMethod clientSaveComp() [ Language = javascript ]
{
zenPage.SaveComp();
alert('test');
zenPage.gotoPage('ZenApp.Company.cls?CompanyId='+id);
}
Method SaveComp() As %Integer [ ZenMethod ]
{
try {
set failed = 0
TSTART
// saving info here
TCOMMIT
} catch {
TROLLBACK
set failed = 1
&js<alert('Error in Saving Company.');>
}
quit 'failed
}
-Roberto
--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
Ok, here it is
// InvokeInstanceMethod: 12@%ZEN.Component.select:ReallyRefreshContents()
try {
var enc = this.window.document.getElementById('addlist');
zenASSERT(enc,"Unable to find enclosing element.",arguments);
enc.innerHTML = '<select class=\"select\" id=\"control_34\" onchange=\"zenPage.getComponent(34).onchangeHandler();\">\r\n<option selected=\"1\" value=\"0\">New Address</option>\r\n<option value=\"189049\"></option>\r\n</select>\r\n';
var comp = zenPage.getComponent(34);
if (comp.overlayMode!=0) { comp.setOverlayMode(comp.overlayMode); }
if (comp.onRefreshContents) { comp.onRefreshContents(); }
zenInvokeCallbackMethod(comp.onrefresh,comp,'onrefresh');
if (comp.exposeComponent) { comp.exposeComponent(); }
}
catch(ex) {
zenExceptionHandler(ex,arguments,'A JavaScript error occurred while invoking a server instance method.\nClass: %ZEN.Component.select\nMethod: ReallyRefreshContents\n');
}
// %EndChangeTracking: sync client with server changes
try {
}
catch(ex) {
zenExceptionHandler(ex,arguments,'A JavaScript error occurred in %EndChangeTracking.');
}
if (zenPage && zenPage.onServerMethodReturn) {
zenPage.onServerMethodReturn('ReallyRefreshContents');
}
Cache for Windows (x86-64) 2011.1 (Build 496U) Tue May 10 2011 22:38:07 EDT
Ok, fixed it.
The problem was my server side save method was calling another method which updates some fields on the page because the save method didn’t move on to another page in a previous iteration of the page. And since the client method which started this whole chain of methods has a gotoPage command, Chrome was complaining because there were changes to the page which didn’t get applied since the method was moving to a new page.
Thanks,
Orion
Ok, fixed it.
The problem was my server side save method was calling another method which updates some fields on the page because the save method didn’t move on to another page in a previous iteration of the page. And since the client method which started this whole chain of methods has a gotoPage command, Chrome was complaining because there were changes to the page which didn’t get applied since the method was moving to a new page.
Thanks,
Orion
From: intersys...@googlegroups.com [mailto:intersys...@googlegroups.com] On Behalf Of Orion Correa
Subject: RE: [InterSystems-Zen] Re: unable to process hyperevent
Sent: Thursday, August 11, 2011 10:53 AM
Ok, here it is
// InvokeInstanceMethod: 12@%ZEN.Component.select:ReallyRefreshContents()
try {
var enc = this.window.document.getElementById('addlist');
zenASSERT(enc,"Unable to find enclosing element.",arguments);
enc.innerHTML = '<select class=\"select\" id=\"control_34\" onchange=\"zenPage.getComponent(34).onchangeHandler();\">\r\n<option selected=\"1\" value=\"0\">New Address</option>\r\n<option value=\"189049\"></option>\r\n</select>\r\n';
var comp = zenPage.getComponent(34);
if (comp.overlayMode!=0) { comp.setOverlayMode(comp.overlayMode); }
if (comp.onRefreshContents) { comp.onRefreshContents(); }
zenInvokeCallbackMethod(comp.onrefresh,comp,'onrefresh');
if (comp.exposeComponent) { comp.exposeComponent(); }
}
catch(ex) {
zenExceptionHandler(ex,arguments,'A JavaScript error occurred while invoking a server instance method..\nClass: %ZEN.Component.select\nMethod: ReallyRefreshContents\n');