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
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