Passing values to a LINKSCREEN in PH Web

Richard Sheehan sheerich@isu.edu
Fri, 29 Jun 2001 09:54:24 -0600


Blue,

Your welcome,  we are running on a HP3000 with our dispatcher on
webserver on a HP9000.

As far as testing the JavaScript:

>Using the JavaScript method, I don't see where the data values are being
>passed to the called screen in the web page.  Is this hidden?  How can I
>test the JavaScript to make sure the data values are being passed?

Here is a little routine that should do what you want.  Modify as
appropriate and add to your JavaScript function being called by the
button click.

function buttonclick(){

var i=0;
while ((typeof(self.document.FORMNAME.elements[i]) == "object") &&
confirm(self.document.FORMNAME.elements[i].name + " = " +
self.document.FORMNAME.elements[i++].value));

// the rest of the function being called by your button click.
//
//
//
//

}


Richard

"Edis, Bob" wrote:
> 
> Thanks for the info Richard.
> 
> You must not be using the Windows NT version of PH.  The WinNT version
> (8.21D) does not have a user interface for Quick so one can't run the
> screens in terminal mode. :(
> 
> Bob D.  Can we request that this be available in the next version, please?
> It would help a great deal if we can separate HTML issues from Quick issues
> in the debug process and being able to run the screens in terminal mode will
> facilitate this.  Debug is a great tool in figuring out issues in PH screens
> and not being able to use it on NT is a pain.
> 
> Regards,
> Blue
> 
> -----Original Message-----
> From: Richard Sheehan [mailto:sheerich@isu.edu]
> Sent: Friday, June 29, 2001 9:30 AM
> To: Edis, Bob
> Subject: Re: Passing values to a LINKSCREEN in PH Web
> 
> Bob,
> 
> I have compiled several screens in debug mode for PH Web.  It was of
> enormous help in learning what is happening in PHWeb Quick screens and
> general debugging.  The nice thing about PHWeb quick screens in debug
> mode is that you don't have to work around passed items which might
> otherwise cause the error "An incorrect number of linkage parameters was
> passed to the screen."  Since the screen accepts the values you are
> interested in, you just need to enter them as they are prompted for in
> the screen being debugged.
> 
> One thing to remember, you must run the quick screen as a terminal
> application, leaving "PH Web" out of the picture for the time being.
> Since you are running the quick screen as a terminal application, your
> screen layout will need to be such that it will fit on your terminal
> screen.
> 
> >From there, in order to perform various PH Web actions, you should
> follow the "Application Engine Command Sequence" found in Ch. 5 of the
> PH Web manual under "PowerHouse Web Server Actions" to mimic the
> sequence of events occurring for your quick screen.
> 
> HTH.
> 
> Also, another thing we have discovered here after a short time:  Looking
> at the Table referred to above, temporary items may reset at mode, which
> could have undesired effects.  For almost all of our temporary items, we
> add the nice little phrase "reset at startup."
> 
> "Edis, Bob" wrote:
> >
> > Thanks Simon
> >
> > I tried a designer procedure like you said but when I click on it, the
> > screen flickers bit and nothing else happens! :(
> >
> > Can I use debug with PH Web screens?
> >
> > Regards,
> > Blue
> >
> > -----Original Message-----
> > From: Bodger, Simon [mailto:Simon.Bodger@cognos.com]
> > Sent: Thursday, June 28, 2001 7:14 PM
> > To: 'Edis, Bob'; 'powerh-l@list.swau.edu'
> > Subject: RE: Passing values to a LINKSCREEN in PH Web
> >
> > Hi Bob
> >
> > I confess I've not fully read through all you supplied in detail, but it
> > sounds as if you're getting your Client Side (in this case JavaScript in
> the
> > browser) and Server Side (in this case PowerHouse Web) slightly mixed up.
> >
> > The values passed in the <A HREF..> link are generated on the SERVER, and
> by
> > having the user enter a value and immediately clicking the link, you never
> > go back to the server and get the link regenerated to reflect the changed
> > value.
> >
> > Instead of having your users click on a link after entering the value,
> > consider giving them a button instead.  You could then change your
> > LINKSCREEN to a DEFER LINKSCREEN within a designer procedure linked to
> that
> > button.  You may also need to code ACCEPT statements for all the values
> you
> > pass.
> >
> > Have fun.
> >
> > Simon.
> >
> > -----Original Message-----
> > From: Edis, Bob [mailto:bob.edis@fleetpride.com]
> > Sent: June 28, 2001 7:32 PM
> > To: 'powerh-l@list.swau.edu'
> > Subject: Passing values to a LINKSCREEN in PH Web
> >
> > G'day all, again
> >
> > Ok, so now my JavaScript is 'maybe' resolved.  What I'm trying to do is
> call
> > one screen from another like so.
> >
> > Screen A.
> > User enters a customer id, finds related records in results list and data
> is
> > loaded for selected record (happens to be a cheque).
> > User enters an invoice number (temp item) on screen and clicks link to
> > subscreen (screen B) to see invoice detail (actually could be several
> > records as invoice number is not unique).  There user selects invoice
> record
> > and is taken to a posting screen to apply part or all of the cheque value
> to
> > the selected invoice (screen C).
> >
> > In screen A the logic is:
> >
> > QKS
> > ...
> > TEMP t_invoice_nbr     VARCHAR*15 RESET AT STARTUP
> > TEMP t_invoice         CHAR*01 INIT "Y"
> > ...
> > FIELD t_invoice_nbr LABEL "Invoice #:"  &
> >   LOOKUP ON post_invoice                &
> >   MESSAGE "*E* Invoice not found!"
> > FIELD t_invoice        NOLABEL
> > ...
> > LINKSCREEN pc_select_invoice LABEL "Select Invoices"                &
> >            ACTION "SEARCH"                                          &
> >            PASSING corp_cust_id     AS "POST_INVOICE:corp_cust_id", &
> >                    t_invoice_nbr    AS "POST_INVOICE:invoice_nbr",  &
> >                    check_nbr        AS "t_check_nbr",               &
> >                    check_date       AS "t_check_date",              &
> >                    amount           AS "t_check_amount",            &
> >                    amount_applied   AS "t_amount_applied",          &
> >                    amount_open      AS "t_amount_open",             &
> >                    t_invoice_status AS "t_invoice_status",          &
> >                    check_key        AS "t_check_key",               &
> >                    t_invoice,                                       &
> >                    t_sort_inv_nbr
> >
> > HTML
> > <input type="hidden" size="1"  name="T_INVOICE"
> > value="<!--PH:VALUE:T_INVOICE-->">
> > ...
> > <table width="60%" cellpadding="0" cellspacing="0" frame="void">
> > <tr>
> > <td align="right">
> > <B><I>Invoice Number&nbsp;</i></b>
> > </td>
> > <td width="18">
> > <input type="text" size="14" name="t_invoice_nbr"
> > value="<!--PH:VALUE:t_invoice_nbr-->">
> > </td>
> > <td align="left">
> > <A
> >
> HREF="/cgi-bin/phcgi.exe?PH_QKC=pc_select_invoice&amp;PH_APP=CORPCUST_APP&am
> >
> p;PH_HTML=pc_select_invoice.htm&amp;PH_ACTION=Search&amp;POST_INVOICE:corp_c
> >
> ust_id=<!--PH:LINKVALUE:POST_CHECK:corp_cust_id-->&amp;POST_INVOICE:invoice_
> >
> nbr=<!--PH:LINKVALUE:T_INVOICE_NBR-->&amp;t_check_nbr=<!--PH:LINKVALUE:POST_
> >
> CHECK:check_nbr-->&amp;t_check_date=<!--PH:LINKVALUE:POST_CHECK:check_date--
> >
> >&amp;t_check_amount=<!--PH:LINKVALUE:POST_CHECK:amount-->&amp;t_amount_appl
> >
> ied=<!--PH:LINKVALUE:POST_CHECK:amount_applied-->&amp;t_amount_open=<!--PH:L
> >
> INKVALUE:POST_CHECK:amount_open-->&amp;t_invoice_status=<!--PH:LINKVALUE:T_I
> >
> NVOICE_STATUS-->&amp;t_invoice=Y&amp;t_check_key=<!--PH:LINKVALUE:POST_CHECK
> > :check_key-->"><font color="#FFFF80">Select Specific Invoice</font>
> > </A></font>
> > </td>
> > </tr>
> > </table>
> >
> > In screen B the logic is:
> >
> > QKS
> > ...
> > TEMP t_invoice CHAR*01 RESET AT STARTUP
> > ...
> > FILE post_invoice IN cidb PRIMARY                &
> >      HTMLKEY corp_cust_id                        &
> >      HTMLFIELD corp_cust_id, customer_id,        &
> >                invoice_nbr, po_nbr,              &
> >                amount, date_invoice,             &
> >                source_system, branch_id
> > ACCESS VIA     corp_cust_id, invoice_nbr         &
> >        USING   corp_cust_id, invoice_nbr         &
> >        ORDERBY customer_id, branch_id            &
> >        REQUEST corp_cust_id, invoice_nbr, t_invoice
> > ...
> > FIELD Corp_cust_id        OF post_invoice PREDISPLAY LABEL "Corp ID  "
> > ...
> > FIELD invoice_nbr         OF post_invoice PREDISPLAY LABEL "Inv Nbr  "
> > ...
> >
> > PROCEDURE INITIALIZE
> > BEGIN
> > ...
> >   ACCEPT t_search_thread
> >   ACCEPT t_ph_loadid
> >   ACCEPT t_invoice
> > END
> >
> > HTML
> > <tr>
> > <td>Corp Cust Id</td>
> > <td><input type="text" size="11" name="POST_INVOICE:Corp_cust_id"
> > value="<!--PH:VALUE:POST_INVOICE:Corp_cust_id-->"></td>
> > </tr>
> > <tr>
> > <td>Invoice Nbr</td>
> > <td><input type="text" size="15" name="POST_INVOICE:invoice_nbr"
> > value="<!--PH:VALUE:POST_INVOICE:invoice_nbr-->"></td>
> > </tr>
> > <tr>
> > ...
> > <input type="hidden" size="1"   name="T_INVOICE"
> > value="<!--PH:VALUE:T_INVOICE-->">
> >
> > Now for the problem.
> >
> > When the user enters an invoice number in the t_invoice_nbr field and
> clicks
> > on the link, the value for POST_INVOICE:invoice_nbr is not being passed.
> > How do I make the screen pass this value?
> >
> > Here is what is being passed at run-time:
> >
> > <A
> >
> HREF="/cgi-bin/phcgi.exe?PH_QKC=pc_select_invoice&amp;PH_APP=CORPCUST_APP&am
> >
> p;PH_HTML=pc_select_invoice.htm&amp;PH_ACTION=Search&amp;POST_INVOICE:corp_c
> >
> ust_id=0&amp;POST_INVOICE:invoice_nbr=&amp;t_check_nbr=98765&amp;t_check_dat
> >
> e=06/10/01&amp;t_check_amount=546.87&amp;t_amount_applied=0&amp;t_amount_ope
> > n=546.87&amp;t_invoice_status=&amp;t_invoice=Y&amp;t_check_key=4"><font
> > color="#FFFF80">Select Specific Invoice</font></A></font>
> >
> > Man, I feel like I'm back in school learning PH Web; it's sooo different
> to
> > standard programming in PH4GL.
> >
> > Regards,
> > Blue
> >
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > Mailing list: powerh-l@lists.swau.edu
> > Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> > Unsubscribe: "unsubscribe" in message body to
> > powerh-l-request@lists.swau.edu
> > http://lists.swau.edu/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must be a subscriber.
> >
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > Mailing list: powerh-l@lists.swau.edu
> > Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> > Unsubscribe: "unsubscribe" in message body to
> powerh-l-request@lists.swau.edu
> > http://lists.swau.edu/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must be a subscriber.
> 
> --
> Richard Sheehan,
> Administrative Systems - IT Programmer Analyst Associate
> Idaho State University Computing & Communications
> Campus Box 8037, Pocatello, ID 83209-8037
> Phone: 208.282.3861 - Fax: 208.282.3673
> Email: sheerich@isu.edu
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.

-- 
Richard Sheehan,
Administrative Systems - IT Programmer Analyst Associate
Idaho State University Computing & Communications
Campus Box 8037, Pocatello, ID 83209-8037
Phone: 208.282.3861 - Fax: 208.282.3673
Email: sheerich@isu.edu