Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW 15.5.5 PerformAfterAsyncProcessing(); formClass is not defined
#1
With IntraWeb 15.5.4 (and .5) for an ISAPI.DLL we sometimes get a JavaScript console error (in FireFox F12) that says:

Error in processAjaxExecute when evaluating: PerformAfterAsyncProcessing(); formClass is not defined

The error can be trace to the IWBase_xxxx.js file. 

This does not happen with IntraWeb 15.4.2. Any idea? We haven't changed anything else.

Note that it looks like everything on the page itself is still working, but I want to ensure everything is fine before we deploy this version.

Thanks in advance!

Groetjes, Bob Swart
Reply
#2
Hi Dr. Bob,

I'll have a look. Did you ever get it in SA mode while debugging/developing?

Cheers
Reply
#3
PerformAfterAsyncProcessing() is not a method part of IntraWeb codebase. Is this your parts of your own code or 3rd parties?
Reply
#4
PerformAfterAsyncProcessing() is a JavaScript function of our own, it is called in the DoGenerateForm of our main base form (derived from TIWAppForm, and the parent for all our other intraweb forms.


Code:
procedure TIWCaiwBaseForm.DoGenerateForm(AStream: TIWRenderStream);
begin
  inherited;

  if WebApplication.IsCallBack then
    WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('PerformAfterAsyncProcessing();'#10);
end;


If looks like the above JavaScript is now added before the formClass value itself is present.

'formClass' is a javascript variabele which is set in our $(document).ready( ) function, based on the value of IW_FormClass.

Code:
formClass = $("input[name=IW_FormClass]").val()


IWForm.pas sends the IW_FormClass to the browser (line 821) in procedure TIWForm.DoGenerateForm:

Code:
Contents.AddHiddenField('IW_FormClass', Self.ClassName);

So my guess is that AddJavaScriptToExecuteAsCDATA may end up in the resulting page in a slightly different order using IW 15.5.x compared to IW 15.4.2 ??
Reply
#5
I'll try to simulate it here and see how it goes.
Reply
#6
Hi again Dr. Bob,

I'm having a little trouble recreating it... more specifically, how to you trigger the DoGenerateForm() on Async? Do you force a reload or any other specific action? Are you swiching forms?
Reply
#7
I see the message when we enter a new page, as soon as that page is being loaded (which almost sounds like an Async event is happening at that time, I'lll see if I can figure this out on our end as well - but like I said, the same applications runs without this message using IW 15.4.2).
Reply
#8
We seem to have solved it on our end by adding some more code to the DoGenerateForm using AddToInitProd, sorry to waste your time on this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)