IE8+, onservermethodcall/return

36 views
Skip to first unread message

sebth

unread,
Apr 16, 2013, 3:31:18 AM4/16/13
to intersys...@googlegroups.com
Hello,

i have a question on the JS callbackmethods onServerMethodCall and onServerMethodReturn. My Usecase is the following:

1. Consider a page which provide some functionality such as loading/saving/validation forms
2. Some Servermethods need to be called synchronously such as loadForm(...)
3. Once the User click a tree Item to load the form a JS/CSS Overlay will be displayed
4. If the Method return the overlay will be set to hidden

So this is a common way of locking/unlocking a screen. Now the technical part

2. Call loadForm(...) sync
3. OnServerMethodCall --> enable the overlay (make it visible)
4. OnServerMethodReturn --> disable the overlay (make it hidden)

I´ve implemented this and all works fine in Firefox but not for IE in Version 8+ (the overlay simply does not appear). So i´ve tested a litte in the Internet Explorer and if i call the loadForm(...) async the Overlay Screen will be enabled and disabled but earlier then server method returns (of course loadForm(...) was called async). So my thought is that it has something to with... when the onservermethodcall is invoked by the client-browser. Maybe IE doe´s it different (as often) as Firefox, Opera etc.

So does somebody know the problem of when interpreting onservermethod... is there a back door to fix it?

 Best regards,

Sebastian

Bill McCormick

unread,
Apr 16, 2013, 6:57:01 AM4/16/13
to <intersystems-zen@googlegroups.com>, intersys...@googlegroups.com
I recall looking at something in this area before. The answer was that IE does not call it's renderer. So the code ran but IE has the option not to repaint the screen. There was a way to force it as I recall too. 

Bill
--
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
---
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-z...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

sebth

unread,
Apr 16, 2013, 9:00:06 AM4/16/13
to intersys...@googlegroups.com
Hi Bill,

did you mean this thread? Suggest using zenSetDefferedAction() Hack?

https://groups.google.com/forum/?fromgroups=#!searchin/intersystems-zen/IE$20does$20not$20call$20it%27s$20renderer/intersystems-zen/AXJd3sHQP5k/2gcmSHdkY1gJ


Best regards,

Sebastian


Am Dienstag, 16. April 2013 12:57:01 UTC+2 schrieb Bill McCormick:
I recall looking at something in this area before. The answer was that IE does not call it's renderer. So the code ran but IE has the option not to repaint the screen. There was a way to force it as I recall too. 

Bill

On Apr 16, 2013, at 3:31, "sebth" <sebastia...@live.de> wrote:

Hello,

i have a question on the JS callbackmethods onServerMethodCall and onServerMethodReturn. My Usecase is the following:

1. Consider a page which provide some functionality such as loading/saving/validation forms
2. Some Servermethods need to be called synchronously such as loadForm(...)
3. Once the User click a tree Item to load the form a JS/CSS Overlay will be displayed
4. If the Method return the overlay will be set to hidden

So this is a common way of locking/unlocking a screen. Now the technical part

2. Call loadForm(...) sync
3. OnServerMethodCall --> enable the overlay (make it visible)
4. OnServerMethodReturn --> disable the overlay (make it hidden)

I´ve implemented this and all works fine in Firefox but not for IE in Version 8+ (the overlay simply does not appear). So i´ve tested a litte in the Internet Explorer and if i call the loadForm(...) async the Overlay Screen will be enabled and disabled but earlier then server method returns (of course loadForm(...) was called async). So my thought is that it has something to with... when the onservermethodcall is invoked by the client-browser. Maybe IE doe´s it different (as often) as Firefox, Opera etc.

So does somebody know the problem of when interpreting onservermethod... is there a back door to fix it?

 Best regards,

Sebastian

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSy...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-...@googlegroups.com

sebth

unread,
Apr 18, 2013, 1:32:22 AM4/18/13
to intersys...@googlegroups.com
Hi,

does somebody have an idea on how to fix this issue - forcing the IE Renderer to do his job?

Best regards,

Sebastian

Derek Day

unread,
Apr 18, 2013, 2:48:59 PM4/18/13
to intersys...@googlegroups.com

I think async is the way to go, but you need to keep track of the pending async requests (that require the overlay), and only hide the overlay once they have returned.

 

HTH,

Derek Day

Application Developer,

Application Services

InterSystems Corp

--

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

Message has been deleted

sebth

unread,
Apr 25, 2013, 1:02:49 AM4/25/13
to intersys...@googlegroups.com
Hi Derek,

i realy would like to call those kind of server method synchronousely. But Displaying the overlay "lockscreen" doesn´t work in this scenario at least in IE and Chrome. I´´ve created a testpage with a button and a control to switch kind of invokation of a the servermethod (see attached file). The problem becomes more clear. The suggested solution of invoking the servermethod with a short delay as mentioned in the link i´ve posted above doesn´t work. Anyboy an other idea?

Best regards,

Sebastian

To post to this group, send email to InterSy...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-...@googlegroups.com

overlay_test.xml

Derek Day

unread,
Apr 25, 2013, 9:12:11 AM4/25/13
to intersys...@googlegroups.com

My idea is to call the server methods asynchronously and to keep a data structure that remembers the calls that you have made. Then in onservermethodreturn, you remove each call from the stack and remove the overlay when the stack is empty.

 

This has been discussed a lot in the broader Ajax world and the common consensus is called Ajax (A=Asynchronous)! The overlay effectively blocks your UI and simulates a synchronous call in a universally supported manner.

 

~Derek

To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages