HTML Page Does Not Refresh properly !

Christian Audet

Christian Audet

Moderator
Staff member
Hi All,

I'm having a little @#$%#@#%!! problem in HTML regarding screen refresh and I'm wondering if one of you ever came across a similar problem. First of all I want to tell you that all of our attempt to resolve this always worked in FAT not in WEB(as usual !!)

Let's explain :

The Problem
------------------

My screen have a button call "Load" that take care of the loading process (no need to explain the loading process, here is not the problem). The problem is that at the begining of my load button I have a line to disable the "Load" button itself so the user don't click on twice and that the WEB Engine only execute the "disable" at the end of my load button !!!

Pseudo-code of the code in problem
-----------------------------------------

Load Button Code
=================
1- Disable load button (to prevent user to click on it another time)
2- Loop until the load process is over (may take 10 minutes)
3- Activate another button on screen that is the "next step" after loading
(Line 1 take effect only after line 3 !!!!)

What happen is that while the code is in line 2 (the loop) line 1 never refreshed the screen and will only do it after the entire code is finish. So in my problem every enable and disable are visible to user once at the end of the event rule. Again the problem is that the user will be allowed to click on the Load Button even if it's in the process of loading.

What we tried
-----------------------

Since the problem seems to come from the fact that the disable is only executed at the end of a event rule we tried to the folowing pseudo-code :

Have a extra invisible button called "ExtraButton" that contain the disable of the Load Button.

Then :

1- Call "Pushbutton" ExtraButton (knowing that the pushbutton should trigger a HTML Post)
2- Loop until the load process is over
3- Activate another button on screen that is the "next step" after loading

Result is the same : My Load button get disabled only after the end of the load button Event Rules (after line 3).

WE also tried to have the "disable button" line elsewhere in other control, calling control with set focus, but the result is always the same.

So, What do I Want ?
----------------------------

I want a button that can disable itself as soon as you click on it so the button stay disable while the button does his job. This need to work in web, FAT as always worked fine. How can I force a HTML Refresh if all my attemps failed ?

Christian Audet
 
How do you have IE configured (Internet Options->Settings)? We had problems if option "Every Time Visited The Page" was not selected for cache.
 
What ! a Internet explorer setting that can affect my refresh ! Good idea, but I just tried it and still no luck. I'm still looking for a solution, Thank's for the help.

Christian Audet
 
Christian,

What is you're InteractivityLevel in the section ERPINTERACTIVITY in you're JAS.INI

Be careful though, changing this will affect the entire JAS installation

Ian
 
Ian,

I did not come to my CNC team yet, but I already know the questions they will have before telling me NO to any .ini changes.

What is that setting ?
What does it do ?
As this setting already fixed a similar problem, what was this problem ?

Sorry for all those question back but I will and they will need to have a better understanding of this parameter before they try anything.

Christian Audet
 
Use the HTML Auto Refresh option in a form's property settings to turn off the automatic post on all non-critical events for that form. Then, use the HTMLPOST option for each control you wish to post. This option is in the event rules menu bar. Therefore, you should be able to set a flag so when the page is posted it knows whether the button was clicked or not. If the button was clicked, disable it :)

Let me know if this solves it.
 
Back
Top