WebTimers and Internet Explorer

Hello ,

I have a problem with a web application and Internet Explorer.
I have a web page that has a WebTimers set with a frequency of one second .
We currently use three different PCs for testing all equipped with
Windows Seven 64 bits.
If I access the page with the timer using Chrome and Mozilla
everything is working properly .
With Internet Explorer I get different behaviors.
On the three machines I have three different version of Explorer

PC “A” with Internet Explorer 8 not working
PC “B” with Internet Explorer 10 working
Pc "C " with Internet Explorer 11 not working

The error message that is presented is as follows:


Could not execute javascript returned : Invalid action for the object
Source : new Timer ( ’ TizK2buQ ’ , [ ’ DoubleClick ’ , ’ GotFocus ’ , ’ KeyPressed ’ , ’ LostFocus ’ ,
’ MouseDown ’ , ’ MouseEnter ’ , ’ mouseExit ’ , ’ mousemove ’ , ’ MouseUp ’ , ’ Action ’ ] ) ;
Xojo.controls [ ’ TizK2buQ ’ ] . SetEnabled (true);
Xojo.controls [ ’ TizK2buQ ’ ] . SetMode ( 2 ) ;
Xojo.controls [ ’ TizK2buQ ’ ] . SetPeriod ( 1000) ;
new button ( ’ B8q7Nbsa ’ , [ ’ Action ’ ] ) ;
Xojo.controls [ ’ B8q7Nbsa ’ ] . SetEnabled (true);
new TextLabel ( ’ GwASK3kX ’ , [ ’ TextChanged ’ ] ) ;
Xojo.controls [ ’ GwASK3kX ’ ] . SetEnabled (true);
new frameworkObject ( ’ DArbhOHF ’ , [ ] ) ;
Xojo.controls [ ’ DArbhOHF ’ ] . SetEnabled (true);
Xojo.view.showPage ( ’ DArbhOHF ’ ) ;
document.title = “Untitled” ;

Xojo.refreshControl ( ’ TizK2buQ ’ ) ;
Xojo.refreshControl ( ’ B8q7Nbsa ’ ) ;
Xojo.refreshControl ( ’ GwASK3kX ’ ) ;


I have checked that JavaScript is enabled on all three PCs .
I tried with Xojo 2013 R4.1 and 2014, R1 the result is the same.

I cannot find any solutions to this problem in the forum.
Does anyone have any suggestions about it .
Thanks for your help

Daniele

I could not reproduce the problem with Internet Explorer 11.0.9600.17105. I do not have 8 anymore.

Because WebTimer runs on the client, it could suffer from browser incompatibility.

Possible solution : you test Session.Header(“User-Agent”) and if it is the problem browser, user Timer instead. As server side, it should be imune.

Or, if it does not slow down too much, simply remove WebTimer and use Timer instead for all sessions.

What version of Xojo are you testing with?

What else is on the page besides a WebTimer, a WebButton and a WebLabel?

Thank you for your support.

Michel,
I’m doing some tests to see if I can use a timer on the client side.
In fact, removing the control WebTimer and using a timer instantiated from code in the Open event of the web page the problem no longer occurs.
However, another problem presents itself to me. The method that I have placed into the Action Timer fails to call a method in the section Session

Greg,
I’m using the 2013 version R 4.1
the page contains one button and one label.

I have not found a solution for this problem.
I solved abandoning WebTimer.
Now I use a Timer initialized in the Open event of the web page.

A server side Timer? (Class Timer is server side; class WebTimer is client triggered.) Timer.Action will not have a Session context set when fired. You have to identify the Session you need to work with and setup the context.

I put this code in the Open event of web page:
tmr_UpdateDay = New Timer
tmr_UpdateDay.Period = 1000
tmr_UpdateDay.Mode = Timer.ModeMultiple
AddHandler tmr_UpdateDay.Action, AddressOf TimerPageUpdate

I add the method TimerPageUpdate in webpage:
//TimerPageUpdate

//With this code I can access to the method declare in session
Dim objTest As WebSession = Session
Dim objSession As WebSession = App.SessionForControl(Self)
Dim objContext As New WebSessionContext(objSession)
objTest = Session
// code for screen update

Then I add tmr_UpdateDay property declared as Timer
so the timer works and I can access the session data