Managing client hyperlinks

For client hyperlinks, an HTML anchor <A> element directly links one page to another. On the linking page, you specify the parameters (including the type of binding and the value for the parameter) you want to pass to parameters on the target page.

The following drawing illustrates how parameters are made available to a target page from a hyperlink on a linking page in a target. Parameters are passed the same way for JSP targets, except that the target and linking pages would typically have .jsp extensions instead of the .htm extensions displayed in the drawing:

Figure 10-1: Passing parameters in a hyperlink

The illustration shows a Client browser with a linking page labeled p 1 dot h t m. The linking page has an H T M L anchor < A > element that links to Page 2 dot htm. The client system sends the URL for  P 2  dot h t m with specified parameters to the system that runs the Web and application server. This system sends P 2  dot h t m back to the client. system.

The server sets the parameters sent to the target page. Only initial values are passed to the target parameters; client-entered values are not processed.

StepsTo pass parameters with a client hyperlink:

  1. Drag an HTML A element from the Language tab of the System Tree to a 4GL Web page in the HTML editor (Page or Source view) or Click the hyperlink tool button in the painter bar for the HTML editor with a 4GL Web page open in Page or Source view.

    The Hyperlink Properties dialog box displays.

  2. On the Hyperlink page, specify link information, including a target page destination.

    Make sure the Server-Side Scriptable check box is selected.

  3. On the Parameters page, specify page parameters for the target page, the type of binding for each parameter, and the value from the current page that you want to bind to each parameter.

    NoteIf not 4GL If the linking page is not 4GL, the Parameters tab is grayed out.

    If the linking page is 4GL and the target page exists and has page parameters defined for it, these parameters display automatically under the Parameter Name column. They are available for binding to constants, expressions, page parameters, and page variables from the current page.

    You can add new parameters to the list and define them later in the target page. Parameters and variables on the current page automatically display under the Bind Value column when you select a bind type of Page Parameter or Page Variable, respectively.

    The sample shows the Parameters tab page of the Hyperlink Properties dialog box. At top is the text ! Parameters bound to variables will use initial values only. Below this are columns for Parameter Name, Bind Type, and Bind Value which display sample row entries such as Cust Number, Constant, 101, and param 1, Page Parameter, param 1.
  4. Click OK after you finish setting the hyperlink properties.

For information about setting hyperlinks on DataWindow objects and columns, see Chapter 11, “Using the Web DataWindow Design-Time Control.”