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.
I have an html report with four dropdowns and an iframe with the report results. I'm trying to change the reset button to clear all four dropdowns and the iframe with one click. I changed the reset button type to button and added the onclick event handler. Here is the code for it (which is inside SCRIPT tags with some other functions):
//Begin function form1Reset_onclick
function form1Reset_onclick(ctrl) {
document.getElementById('combobox1').contentWindow.Reset();
document.getElementById('combobox2').contentWindow.Reset();
document.getElementById('combobox3').contentWindow.Reset();
document.getElementById('combobox4').contentWindow.Reset();
document.getElementById('report1').contentWindow.Reset();
}
//End function form1Reset_onclick
</SCRIPT>
If I leave the type as reset, then all four dropdowns reset, but when I use the above code, nothing gets reset. Any ideas?
Thanks! TheresaThis message has been edited. Last edited by: Theresa,
This should work for all form objects. An IFRAME is not form a object, but a container for HTML. You need to change the location of the iframe to an empty html page.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Originally posted by Enigma006: Why not use the Reset button given by HTML composer. It does the job without writing any code manually..
Thanks
I tried that. That was the reset button I was trying to modify. It cleared all of the dropdowns, but not the report output which is in an iframe. I need all of them reset with the click of one button.
My VPN was fixed today. I tried your suggestion, but it didn't help. When I click on the Reset button, I get a popup that says that IE needs to resend the information and to click Retry to continue. When I click on Retry, it comes back with a blank page with just the "No query information to decode" message.
I tried the suggestions posted. I can either get all of the dropdowns to reset, or I can get the report results to be cleared. I cannot get one button to clear/reset everything with one click.
Here's what I currently have in my button onclick event handler:
Is the frame part of the form? If it is then it should be reset by the reset action, if not then you need to either ensure that it is wihn the frame or reset it separately.
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, 2004
I tried to simulate your problem. SO I created an html file with four unchained dropdowns to populate &vars for use with selecting records out of the car database. One for country, one for car, one for model and one for bodytype. I included a Run button and a Reset button. The run button runs a very simple report and the reset button was just that, no actions specified. Last the iframe was added to hold the result of the simple report. Running it showed that the reset button reset all dropdowns, but not the iframe. SO added the onclick event for the reset button to clear the iframe. That worked, but now the dropdowns were not reset any more. So what I did was add the reset of the dropdowns myself. Using your code with the 'contentWindow.Reset' mnethod presented a javascript error message. So I tried to simply set the selected index of the combobox to 0. That had the desired effext. The code in the onclick event nnow is:
This works sweet, except how would I get it to work with chained drop downs? When reset it retains the previous load. I have a last name combobox and a first name combobox. Say I pick adams for the last name, this will limit the choices now for the first name down to only three. This is what it is suppose to do. Then I hit reset button, select a different last name and I still get the previous first names........any ideas?? Thanks I'm also having trouble setting the focus on the last name combobox.
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