SetColumnLink (obsolete)

Description

Specifies information used for constructing hyperlinks for data in a column in generated HTML.

Obsolete method

SetColumnLink is obsolete and should not be used, because the Web DataWindow technology is obsolete.

Applies to

DataWindow type

Method applies to

Web

Server component


Syntax

Web DataWindow server component

string dwcomponent.SetColumnLink ( string columnname, string link, string linkargs, string linktarget )

Argument

Description

dwcomponent

A reference to a Web DataWindow server component.

columnname

The name of a column in the DataWindow object associated with the server component whose values you want formatted as hyperlinks in the generated HTML.

link

A URL that is the target of a link (HTML A element) generated for each data item in the column.

The URL can include parameters. Additional parameters from linkargs may be added when the HTML is generated.

Sets the value of the HTML.Link property.

linkargs

A string in the form:

argname='exp'{ | argname = 'exp' } ... 

Argname is an page parameter to be passed to the server.

Exp is a DataWindow expression that is evaluated, and whose value is converted using URL encoding and included in the string.

The evaluated linkargs string is appended to URL in link when HTML is generated to produce a hyperlink for each data item.

For information on constants and quotation marks in linkargs expressions, see SetSelfLink.

Sets the value of the HTML.LinkArgs property.

linktarget

The name of a target frame or window for the hyperlink specified in the Link property. The target is included in the HTML element using the HTML TARGET attribute.

You can use linktarget to implement a master/detail page design by directing the detail page for a data item to a different window or frame.

If linktarget is null or an empty string (""), then no TARGET attribute is generated.

Sets the value of the HTML.LinkTarget property.


Return value

Returns an empty string if successful and the syntax error message from the Modify method if it fails.

Usage

This method calls the Modify method of the server component's DataStore to set the property.

Examples

This JavaScript example for a server-side script sets up hyperlinks for data in the empid column. The data links to a detailed employee report in an HTML template called empdetail.stm.

The employee id is passed as a page parameter so the empdetail scripts can use it as a retrieval argument. The column name is specified as the expression. Empid is a numeric column so its value has to be converted to a string for the page parameter value. When the server component generates the HTML, it evaluates empid for each row and includes the data value as the link argument:

dwMine.SetColumnLink ("empid", "empdetail.stm", "pagearg_empid='String(empid)'", "");

See also

Generate

Modify

SetAction

HTML.property