Passing parameters

adept

New Member
Hi All

I would be glad if someone could help me with the following:

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1" NAME="AUTHOR">
<TITLE>Supervisor's Report</TITLE>
</HEAD>

<SCRIPT LANGUAGE="SpeedScript">
def var li-curr-year as int format "9999" no-undo.
def var li-branch like ct_branch.branch.
def var li-curr-period as int format "99" no-undo.
def var lc-type as char.
DEF var li-quarter AS INT.
def var pv-url as char.

assign li-curr-year = 2003
li-curr-period = 3
lc-type = "Monthly"
li-branch = 4
li-quarter = 0
pv-url = "/ct/pv-tstparam.p (" + string(li-curr-year) + ", "
+ string(li-branch) + ", "
+ string(li-curr-period) + ", "
+ lc-type + ", "
+ string(li-quarter) + ")".

{&OUT}
'<form method="post" ACTION="' HostURL + AppURL + pv-url '">':U skip
'<BR><BR><BR>':U SKIP.

{&OUT}
'<CENTER>':U SKIP
'<INPUT TYPE="SUBMIT" NAME="B1" VALUE="CONTINUE">':U skip
'</CENTER':U SKIP
'</FORM>':U SKIP.
</SCRIPT>
</BODY>
</HTML>


pv-tstparam.p
DEF INPUT parameter li-curr-year as int format "9999" no-undo.
def INPUT parameter li-branch like ct_branch.branch.
def INPUT parameter li-curr-period as int format "99" no-undo.
DEF INPUT parameter lc-type AS CHAR.
DEF INPUT parameter li-quarter AS INT.

{ src/web/method/cgidefs.i }
RUN OutputContentType IN web-utilities-hdl ("application/x-msexcel").

{&Out} li-curr-year
li-branch
li-curr-period
lc-type
li-quarter.



The program pv-tstparam.p returns the message 3234 "mismatched number of parameters passed".
 

Roger01

New Member
Hi Adept

I had the same trouble passing parameter from a file *.html throught out a program either *.p or *.w. I apply the same structure as you describe in text below but only did a bit change over the way to send this parameters and also add a web instructions to receive this (GetField) and it works well!

Rogelio Leal C.

Consultant/Developer
rogelio.leal@volvo.com
 
Top