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     Repopulate Listbox on Button Click

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Repopulate Listbox on Button Click
 Login/Join
 
Silver Member
posted
Hi All,

I have a List box which is updated with data from a fex and a button on a HTML page. I am trying to Refresh the List box everytime the Button is clicked.
Tried using populateDynamicCtrl(obj) but didnt work.

Is there any way this can be accomplished.

Thanks in Advance,
pvpar


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
Guru
posted Hide Post
There is a feature in 7702 that handles this. If you are at 7702, please review the documentation.

Thanks.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Guru
posted Hide Post
Since you are not at 7702 ....

Try this


//Begin function form1Reset_onclick 
function form1Reset_onclick(ctrl) {
document.getElementById('comboBox1').selectedIndex = 0;
window.top.frames.report1.location.href='about:blank';     
}
//End function form1Reset_onclick


The document line will reset your list box
The window line will clear you output frame

Hope this helps out.

MA


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
How about adding the Refresh button in HTML Composer (If you do it this way the whole solution will be using standard WebFOCUS functionality)
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
I have found that when using the "Reset Button" it will reset the controls but not the report frame. And then sometimes when I add the code to clear the frame then it stops resetting the control until I add the code to reset that too.


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
That's not good (I know: tell me something that I don't already know, right?)
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
quote:
(If you do it this way the whole solution will be using standard WebFOCUS functionality)

Hmmm, where have I seen that line before ...



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
quote:
Hmmm, where have I seen that line before ...
I wonder where that was... Music
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Silver Member
posted Hide Post
Thanks everyone for the replies..

MAdams1 I tried using the code you posted, it didn't work. I already have the reset button but want to remove that so that the user doesnt have to reset the listbox everytime he adds something.
Here's some background of what I am tring to do. I have a FOCUS database to which I am tring to add and remove records, say COUNTRY names. I provided a HTML page for this functionality which has two buttons one to add the COUNTRY name, a list box with a Delete Button to delete existing COUNTRIES. Theoretically the user should be able to enter the COUTNRY name in the text box and press ADD Button to add it to the Database and the List box is as updated to reflect the changes. Same is true with the Delete button.
Went through the documentation and the forum too,but couldn't find anything.
Is there a way this can be accomplished.

Thanks,
Pvparuc


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
Guru
posted Hide Post
Do you have the text box and the list box chained?


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
Silver Member
posted Hide Post
No they are not chained.. the List box should change only when the button is pressed..


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
Silver Member
posted Hide Post
any Ideas on how this issue can be resolved without using the refresh button ???


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
Virtuoso
posted Hide Post
I did something similar about five years back and it was a relatively simple Ajax call to wfservlet. Intercept the returning result and use the innerHTML attribute on the listbox to set the new contents.

I realize that's kind of a drive-by recommendation with about zero detail, but as I recall I was worried going in but it turned out to be pretty straightforward. Ajax is really pretty easy once you figure out a couple of basic concepts.

Option 2 -- Flash the screen. The button push submits the page and it returns with the new contents in the listbox. Easy, functional, not super-pretty. Other materials on the screen may prohibit this happening.

Option 3 -- Use JavaScript to call a focexec into a hidden iframe. That is, hand-assemble a url line to make a call to wfservlet. When it arrives have javascript in the iframe grab the output lines from the returning report (i.e., the new contents for the listbox) and set them in the parent window's listbox via the innerHTML attribute. It's pretty basic, but you won't have to dig into an Ajax call and it will keep you out of HTML Composer's idiosyncrasies. This one is easy to do, easy to debug. Leave the iframe visible while you work, hide it when you're done. The result will function like an Ajax call without all the protocol.

Clear as mud?

J.

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report 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     Repopulate Listbox on Button Click

Copyright © 1996-2020 Information Builders