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] Get the value of a checkbox passing to same fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Get the value of a checkbox passing to same fex
 Login/Join
 
Gold member
posted
I'm trying to pass the value of a checkbox in an HTML report that will open a XLS report when clicked. If the checkbox is checked I want it to show a different field in the report column, and if not then show a different value in the report column.

I have the snippets of code:

 
-DEFAULT &EXPORT_VALUE = 'N';

ShowCheckbox/A250 = IF '&XYZ' EQ 'Y' THEN '<input type=checkbox id=EXPORT_VALUE VALUE=Y>export value' ELSE ' ' ; 

TYPE=HEADING,
LINE=1,
ITEM=1,
JAVASCRIPT=SUMMARY('&DOWNLD' 'RPTNAME' '&RPTLVL' \
  '&ID' '&DTFROM' '&DTTO'),

function SUMMARY(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6)
{
var url = PAR1;
url += "IBIF_ex=" + PAR2;
url += "&" + "RPTLVL=" + PAR3;
url += "&" + "ID=" + PAR4;
url += "&" + "DTFROM=" + PAR5;
url += "&" + "DTTO=" + PAR6;

window.open(url,"displayWindow","menubar=yes,scrollbars=yes,status=no,toolbar=yes,resizable=yes,width=800,height=400") ;
}



My question is how do I get the value of the checkbox to pass back to the same report? I've tried looking at this example: http://forums.informationbuild...432%3Fr%3D978102532, but I have been unable to get that to work. This is WebFOCUS 5.2.3.

This message has been edited. Last edited by: Kathleen Butler,


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 2010Report This Post
Expert
posted Hide Post
A couple of ways you can do this but probably the least coding method is to use your existing JavaScript function to capture and add the value something like this (I've assumed that this is within -HTMLFORM BEGIN)-
function SUMMARY(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6)
{
var url = PAR1;
url += "IBIF_ex=" + PAR2;
url += "&|RPTLVL=" + PAR3;
url += "&|ID=" + PAR4;
url += "&|DTFROM=" + PAR5;
url += "&|DTTO=" + PAR6;
var objExport = document.getElementById("EXPORT_VALUE");
if (objExport.checked) {
  url += "&|EXPORT_VALUE=Y";
} else {
  url += "&|EXPORT_VALUE=N";
}

window.open(url,"displayWindow","menubar=yes,scrollbars=yes,status=no,toolbar=yes,resizable=yes,width=800,height=400") ;
}

However, I stress that this is just one way of achieving it and the JavaScript I've added is designed to be readable and understandable by you and therefore does not use the more general IF syntax (before anyone jumps in and says the JavaScript is archaic!Wink).

Hopefully this will help you to understand what you are achieving and therefore be able to progress.

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
Gold member
posted Hide Post
What if the javascript is in another file?


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 2010Report This Post
Gold member
posted Hide Post
I got it to work, thank you!


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 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] Get the value of a checkbox passing to same fex

Copyright © 1996-2020 Information Builders