Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] HTM executes JavaScript, then FEX, conditionally - can it be done?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HTM executes JavaScript, then FEX, conditionally - can it be done?
 Login/Join
 
Member
posted
Hello All,

I am new to WebFOCUS, and am currently using version 8.2.

I have an HTM file with an embedded JavaScript script that validates the user-entered data when the form is submitted.

In the Tasks & Animations, I specify JavaScript (first) and a FEX script (second).
The JavaScript ends with "return true" if the validation does not find errors in the user-entered data, or "return false" otherwise.

All seem to work well, except that the FEX is always executed.

Would it possible for us to get the FEX executed conditionally per the above?

Any insights and hints would be much appreciated.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8007 & 8201
Windows 10, All Outputs
 
Posts: 14 | Registered: April 18, 2017Report This Post
Expert
posted Hide Post
Yes, you should be able to.

First thoughts would be to create a task for the fex execution, and a js function.

In the js function call the created task to launch the fex with the command IbComposer_execute

This assumes that you are creating the page in HTML composer.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Hello Waz,

*** This is my test js.
function execTheFex() {
alert('Launching the fex upon pressing on the OK button...');
IbComposer_execute('myFexReport');
}

*** In Tasks & Animations window...
Trigger Type: Click
Trigger Identifier: button1 (checked)

Requests/Actions: JavaScript call

Target type: JavaScript function
Function name: execTheFex()

*** When run, upon pressing on the button, I got the alert message, but nothing happens after pressing on OK there.

Any suggestions are welcome.

Thank you!


WebFOCUS 8007 & 8201
Windows 10, All Outputs
 
Posts: 14 | Registered: April 18, 2017Report This Post
Expert
posted Hide Post
Congratulations on your first post Simon.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Member
posted Hide Post
Thank you my friend, Doug! I miss you here...
Be safe & be well!


WebFOCUS 8007 & 8201
Windows 10, All Outputs
 
Posts: 14 | Registered: April 18, 2017Report This Post
Expert
posted Hide Post
Hi Simon,

Leave your task to execute the JavaScript on form submission but remove the focexec call.

Instead, create a new task for the focexec and change the trigger type to "TBD". Remember the task id for this.

Within your JavaScript, left click and drag the task for the focexec to the point where your user entered details should result in the execution of the focexec.

This essentially does what Waz suggests above but instead of you having to type the "IbComposer_execute" code, the drag and drop does this for you.

Good luck!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hello Tony A,

Thank you for the detailed explanation.
It works!

*** In List of: a new entry MyFex is created,
Trigger Type: TBD
Requests/Actions: External procedure/myFexReport
Target type: Window

*** Open tab, Embedded JavaScript
drag and drop MyFex (from List of) to the js page, and it does paste the text "IbComposer_triggerExecution("MyFex", 1);" there among the codes.
Rearrange the code to place the statement at the designated line in the js codes.

*** When run, upon pressing on the button, I got the alert message, then after pressing on OK there, myFexReport window appears so beautifully.

Thank you all for making my splash here such an easy one!

Cheers,
-Simon
 
Posts: 14 | Registered: April 18, 2017Report This Post
Expert
posted Hide Post
Hi Simon,

My pleasure. Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Tony, Thanks for helping out my friend Smiler
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] HTM executes JavaScript, then FEX, conditionally - can it be done?

Copyright © 1996-2020 Information Builders