Ticket #285 ( Closed )

Short Description Using hyperlink to advance to next screen
Entered By: mccollun@meijer.com When: 1999-04-27 16:34:23 Build: 1.03.28E
Categories Type: Question   Department: Product   Category: SurferScript
I have several hyperlinks that correspond to different menu options on a screen. In the past I have used the SendKeys function to send the appropriate keystrokes and aid key to move to the corresponding screen.

However, in this instance I also would like to send the value of two input fields that have also been keyed in on the menu screen (a UPC and an item number).

When I click the hyperlink the SendKeys function only appears to send the keystrokes defined in the function call. The input fields do not appear to get transferred back to the 3270 session. It appears that SendKeys is designed to function this way. How can I use a hyperlink to transition to another screen and still send other input fields that have been entered on the page. Any help would be appreciated. Thanks.

Append By: WindSurfer  When: 1999-04-27 22:06:00  New Status: Pending Customer
Comment There are a few ways to do this (of course!)--

The way that is closest to what you are doing now is just a little hacky-- it requires that you know the auto-field names of the UPC and item number on the screen you are working with (like F_100_20 -- you can use the DevCenter to discover, or View Source in your browser when Screensurfer has delivered).

Assuming that UPC is F_100_20 and item number is F_500_10:

<a href="JavaScript:document.location=
     '/surfer/mykeytran?sessionkey=<temacro sessionkey>'+
     '&UrlTwirl=<temacro clockticks>'">MyRequest</a>
Then, define a new transaction in your template, like:
<tesection myrequest
   when tranpath_1 is "mykeytran">
<teaction getsession>
<teaction putfield 2 21 web.UPC>
<teaction putfield 6 21 web.ItemNo>
<teaction enter "keystring that was in the sendkeys">
Append By: mccollun@meijer.com  When: 1999-05-10 13:50:46  New Status: Closed
Comment That worked great! Thanks again for all your help.