Lasso Soft Inc. > Home

-Token

-Token defines a named token. This tag is unique among Lasso's command tags. It requires two parameters, the name of the token which is to be defined and the value for the token.

The name is specified after the -Token tag followed by a period. -Token.First_Name defines a token named First_Name or -Token.34 defines a token named 34.

The value is specified in the same fashion as the value for any command tag. -Token.First_Name=John would set the token First_Name to the value John. -Token.34=Hello would set the token 34 to the value Hello.

The value for a named token can be retrieved using the [Token_Value] tag. For example, [Token_Value: 'First_Name'] or [Token_Value: '34']. The value for a token can only be retrieved in the response page to an HTML form or URL based action which includes a -Token command tag or within the [Inline] ... [/Inline] tags if the opening [Inline] includes a -Token command tag among its parameters.

In order to store and retrieve values within a single format file the [Variable] tag should be used instead.

By simply specifying -Token=Value a single unnamed token can be created whose value can be retrieved with [Token_Value].

  • Syntax
  • Parameters
[Inline: -Token.Name=Value, ...]

<a href="default.lasso?-Token.Name=Value&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-Token.Name" value="Value">
  ...
</form>
Required Parameters
Value The value of the token which is to be set.
Optional Parameters
Name The name of the token which is to be set.
Examples

To define a token within an HTML form:

Use the -Token command tag within a hidden input. The following example defines a token named First_Name and a token named Last_Name within an HTML form. The values for these tokens can be retrieved in the response page to this form using [Token_Value: 'First_Name'] and [Token_Value: 'Last_Name']

<form action="response.lasso" method="POST">
  <input type="hidden" name="-Token.First_Name" value="John">
  <input type="hidden" name="-Token.Last_Name" value="Doe">
  <input type="submit" name="-Nothing" value="Submit Form">
</form>
Tag Link -Token Category Utility
Type Command Data Source Any
Support Preferred Version 2.5
Output Type None Security None
Implementation Sets Lasso 5.0,LDML3x,LDML25

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft