Focal Point
[CLOSED] Display Values Dynamically within an HTML form?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6877068286

June 23, 2016, 04:25 PM
Doug
[CLOSED] Display Values Dynamically within an HTML form?
What's the best practice to Display Values Dynamically within an HTML form?

What I'm looking for is Display Values Dynamically within an iFrame / within an HTML form (AKA: Launch Page). This iFrame will be the display are for the results of a fex which will "SLEEP" for a number of seconds between TABLE FILE request (which pulls data and -READs the results to be displayed in the iFrame) within a -REPEAT Loop.

A "normal" fex will display the results after it's completed execution of all the iterations of the -REPEAT Looping (which is NG).

Maybe the solution is to embed some JS and get it to execute a fex for X number of iterations... Confused

Has anyone done such a thing and are willing to share their findings?

Thanks, Doug

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
June 23, 2016, 04:58 PM
Squatch
You could use a JavaScript timeout and update the frame periodically via a task. A counter would ensure it stops at some point:

//Begin function window_onload
function window_onload() {


UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports

setTimer();
}
//End function window_onload

var count = 10; // Run ten times, one minute apart (60,000 milliseconds).

function setTimer() {
    IbComposer_triggerExecution("task2", 1);
    count = count - 1;

    // Run task again in one minute until the countdown expires.
    if (count > 0) setTimeout(setTimer, 60000);
}



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 09:17 AM
Doug
Thanks Squatch... But, it didn't work... What am I missing?
I assume the following:
1) "task2" should be replaced with the fully qualified fex name, as in a -INCLUDE.
2) There should be a reference to the target iFrame, (Name / ID: iframe1) which I don't see.

This is what I have, only changed "task2" to the fex.
//Begin function window_onload
function window_onload() {


UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports

setTimer();
}
//End function window_onload

var count = 10; // Run ten times, one minute apart (60,000 milliseconds).

function setTimer() {
    IbComposer_triggerExecution("IBFS:/WFC/Repository/edwexrep/StandardReports/AppHoldTimeStampDisplayAutoRefresh.fex", 1);
    count = count - 1;

    // Run task again in one minute until the countdown expires.
    if (count > 0) setTimeout(setTimer, 60000);
}

June 24, 2016, 10:08 AM
Squatch
Oh, sorry... task2 is a reference to App Studio. I assumed you had a task set up in the "Tasks & Animations" panel. If you do, then the "IbComposer_triggerExecution" function will activate it.

It may not be called "task2"... it could be "task3" or "task4", etc.

In the process of setting up the task, you can specify an iframe target.

Are you doing something different?


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 10:13 AM
Squatch
In App Studio, the fex and iframe target for the fex is set up in "Requests & Data sources" and "Tasks & Animations".

Then all you need to specify is the task name, such as task2, task3, task4, etc., for the IbComposer_triggerExecution IBI function.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 10:38 AM
Doug
Thanks Again,

"App Studio" may be where I missed it... I'm doing this in "Dev Studio". Our App Studio is a bit quirky, as in "Requests & Data sources" isn't shown?. Where would I see that?

Trying it anyway.

This message has been edited. Last edited by: Doug,
June 24, 2016, 10:50 AM
Squatch
quote:
Originally posted by Doug:
Thanks Again,

"App Studio" may be where I missed it... I'm doing this in "Dev Studio". Our App Studio is a bit quirky.

I'll try it anyway.

I've never used Dev Studio, so I don't know what the equivalent to setting up App Studio requests and tasks would be.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 10:58 AM
Doug
Two things:
1) I'm on 8007
2) Our App Studio is a bit quirky, as in "Requests & Data sources" isn't shown?. Where would I see that?
June 24, 2016, 11:09 AM
Squatch
quote:
Originally posted by Doug:
Two things:
1) I'm on 8007
2) Our App Studio is a bit quirky, as in "Requests & Data sources" isn't shown?. Where would I see that?

Usually they are on the right side of the screen in the form of tabs, but the annoying thing is that it's so easy to close them out. Then they disappear from the right side.

To get them back, go to the "Utilities" menu and click the corresponding check boxes in the "View" ribbon area.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 11:33 AM
Doug
That's part of the quirkiness... All that's in the Utilities / View ribbon area are: Properties, Settings, Tasks & Animations, and Thumbnails. I think that I'll hold off till App Studio get fixed.
June 24, 2016, 11:45 AM
Squatch
quote:
Originally posted by Doug:
That's part of the quirkiness... All that's in the Utilities / View ribbon area are: Properties, Settings, Tasks & Animations, and Thumbnails. I think that I'll hold off till App Studio get fixed.

Sorry, I think on your release level there was no Requests & Data sources. I think that came in on 8.1.

I forget where to go to set up the data source part on that release. But when it is set up a task can be created to use it.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 24, 2016, 12:02 PM
Doug
Well now, that explains it... The wait is on...

Thanks again, I'll keep this post in mind...