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] Coding a function

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Coding a function
 Login/Join
 
Guru
posted
I am new to WebFOCUS and haven't really had any training on writing FOCUS code only working in the GUI. I am unable to locate any forums for help on my subject. I have three (unchained) combo boxes that I need to clear when a clear selections button is clicked. Anyone have any ideas for me? Thank you very much.

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


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
Welcome to thee forum. I suppose the easiest way would be a JavaScript. If you don't have any experience with that, have a go with www.w3schools.com.


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Guru
posted Hide Post
I will look into JavaScript, thank you. I did try the reset button provided by WF but it is very slow and doesn't really do all I want it to do. I'm still open to any other suggestions.
Thanks


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
I'll assume you created a CLEAR button in your HTML form instead of the stock RESET button generated by IBI when you select Form.

In the HTML GUI, click on the CLEAR button, right-click, select Hyperlink properties, Add, HTML File, select the same HTML form, Target Type- Window and Name - Same window; Clcik OK and try it...

The original form returns...

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Adding to the already great ideas, Consider the following code: htm and Fex

Here's a sample screen shot:


NOTES:
1) The "My Reset" button uses JavaScript to reset the Drop Down Lists (DDLs) which is rather quick as it does not go back to the file to refresh the values. See the "button2_onclick" function in the htm file. It only resets them to the DEFAULT Value. the JavaScript is nothing more then a stategically placed on_change event.
2) The "GUI Reset" is just that. The one from the GUI (click and place from the GUI Toolbar). This one does, seemingly, the same thing. However it has some pros and cons. At least, PRO: It refreshes the DDLs with the most current data (really good if you're on a transactional BD / Source. And, a CON: It's slower because it is refreshing with current data.
3) The "Submit" button does just that: submits the report based on the selections...

The choice is yours...

I hope this helps...




   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
Virtuoso
posted Hide Post
nice example Doug

I did not know Ford delevered jaguar nowadays.
Smiler




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Guru
posted Hide Post
Thank You Thank You. Great examples, That is what I was looking for.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
Doug, the HTML code didn't come through. Could you send it again? Thanks, I'd really like to see your code for your button2_onclick function.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
Right-Click "outside" the iframe and View Source...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Basically Doug is setting the selectedIndex attribute for the combo boxes to 0 using
document.getElementById(cntlid).selectedIndex=0";
What this achieves is just to point the current selection to the first entry and will work for multi select combos as well as singles.

For your non-chained combos this will work well and will prevent the AJAX code to re-populate the controls from being executed (which is what you require).

I wouldn't suggest folks do this for chained combo boxes though as it will cause repetative resets and not really help. If you want to reset a chained set then just reset the selectedIndex attribute of the first in the chain and the underlying JavaScript should do the rest.

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
Guru
posted Hide Post
Tony,

I never did get this to work. I have chained comboboxes. I tried only resetting the first box and the second box never reset. Any other ways. It seems to me like it is "losing" the chain when reset. I have the same problem with the lost chain when I'm doing autocomplete. These comboboxes are giving me fits. Thanks for any help.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report 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] Coding a function

Copyright © 1996-2020 Information Builders