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] Run reports on change of value in dropdowns

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Run reports on change of value in dropdowns
 Login/Join
 
Master
posted
Hai all

This may be more of a html question.

I have a 3 drop downs chained together and there are multiple reports than run and should display.
As of they run from a Submit button.
Is there a way to remove the button and all reports should run when value from drop down is selected. It could be value from any drop down. but with each change of value in each drop down, reports should run. All of them will be single selects though. As of now I am trying by using onclick and onchange events.

Any suggestions on this?

Thanks

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
From an HTML/javascript perspective, adding an onchange event should do it. you may have to be careful with this as I think some changes don't get picked up, say useing rhe keyboard, in some browsers.


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
Master
posted Hide Post
Thanks Waz. I am trying using those functions but I am not sure of the code inside them. I am trying something but doesn;'t seem to go right.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Virtuoso
posted Hide Post
I think you will need buttons to create the 'Hyperlinks' to the fexes to excute.

You can hide those buttons (style display: none) and call their respective OnExecute() handlers from your OnChange events - Do pass in the correct control though, namely that of the button, not that of the dropdown list!


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Gold member
posted Hide Post

 onchange="document.getElementById('form2Submit').click();"



Perhaps?


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report This Post
Master
posted Hide Post
I tried what Wep5622 suggested and it seems to be working good in a way.
thanks..!!


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
You don't need buttons, just the onchange event.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
<script language="JavaScript">
<!--
	function processChange() {
		alert('Change\n\nSubmitting...') ;
		document.forms['testform'].submit();
	}
//-->
</script>
 </head>

 <body>
 <form method=post action="post" name="testform">
  <select name="test" onchange="processChange() ;">
	<option value="1" selected>1
	<option value="2">2
  </select>
 </form>
 </body>
</html>


Firefox and Chrome do not pick up the change if the arrow keys are used, some extra javascript coding and events will be need to capture that.


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
Virtuoso
posted Hide Post
Well, there are some subtleties to this issue specific to WebFOCUS, so I provided an approach for which I was reasonably sure it would work Wink

Normally you would indeed be able to just submit the form instead of using a button, but the situation seems to be a bit more complicated in WebFOCUS. For a button on a launch page (using the HTML Composer) you create a Hyperlink for which the composer generates XML that describes the hyperlink's properties, among which are the fexes that need to be called when the button is used.
I don't think you get those particular lines of XML for any other type of form-element. Hence, if you were to just create an onchange event-handler you would be missing those lines of XML. I doubt the form would work as intended without them.

There's probably a way to copy that behaviour though. For example, you could remove the button from the generated HTML page source after setting up the hyperlink's properties. It's quite possible though that WebFOCUS notices the orphaned XML elements that belonged to the button and removes them. I honestly don't know if it can do that or if a future version might start doing that... Besides, you wouldn't be able to edit the hyperlink properties any more, as that functionality is a property of the button.


As for Firefox (and probably Chrome) not responding to onchange-events when keyboard navigation is used - that's not true.

They fire the event at a different moment than IE (and old Netscape) do, namely when you change focus away from the element in question - which is usually when you tab to the next element. It does work, it just works differently. Knowing the folks behind it a bit - there's probably a rather good reason.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
Suggestion by Waz worked great as well. Thanks all. Can I use the same thing and use both onchange and onclick events?


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report 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] Run reports on change of value in dropdowns

Copyright © 1996-2020 Information Builders