All the launch pages I have created or seen created require the user to click a button to pass parameters and execute the hyperlinked procedure(s). I have created a small procedure with a single variable prompt for Month. I'd like to have the Month Name on my launch page as a drop down control but have the procedure update immediately upon selection of the Month of the dropdown as opposed to making the user select Month and then also select Run. I looked at the HTML that is associated with the button(onclick) and tried applying this to the dropdown(onclick) action but could not mimic the behavior of the button. Is this possible? I understand that if you have multiple selections it makes more sense to have the user select all their parms and then submit but I would think for something with a single parameter it would be easier for the end user to just have the execute occur upon selection of the value.This message has been edited. Last edited by: bcook278,
WebFOCUS 7.6.8 WebFOCUS Client and Server running on RedHat Linux, Developer Studio on Windows XP All output formats
October 22, 2009, 07:36 AM
atturhari
Try with OnChange event on the dropdown
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
October 22, 2009, 10:03 AM
Francis Mariani
Working example
-*-- run1.fex
-SET &ECHO='ALL';
SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
-RUN
-DEFAULT &COUNTRY = 'ENGLAND';
-*-- Prepare report
TABLE FILE CAR
SUM
SALES
BY COUNTRY
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS R001 FORMAT HTMTABLE
END
-RUN
-*-- Prepare drop-down
TABLE FILE CAR
SUM
COMPUTE OPT1/A200 = '<option value="' | COUNTRY | '">' | COUNTRY | '</option>';
BY COUNTRY NOPRINT
ON TABLE SAVE AS S001
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>test</title>
<script type="text/javascript">
function selectCountry()
{
for (var i = 0; i < document.forms[0].COUNTRY.length; i++)
{
if (document.forms[0].COUNTRY[i].value == '!IBI.AMP.COUNTRY;')
{
document.forms[0].COUNTRY.selectedIndex = i;
break;
}
}
}
</script>
</head>
<body onload="selectCountry();">
<!-- form -->
<form action="/ibi_apps/WFServlet" method="get">
<input type="hidden" name="IBIF_ex" value="run1" />
<select name="COUNTRY" onchange="document.forms[0].submit();">
!IBI.FIL.S001;
</select>
</form>
<!-- Report -->
!IBI.FIL.R001;
</html>
-HTMLFORM END
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
October 22, 2009, 11:38 AM
<JG>
Francis, you don't like the painter either?
October 22, 2009, 12:07 PM
Francis Mariani
I paint walls with a gallon of paint and a roller, I use no new-fangled tools.
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