LassoScript Utility
Basics Browse Detail

[LJAX_HasTarget]

Tag Link [LJAX_HasTarget] Category LJAX
Type Substitution Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type Boolean Security None
Implementation Sets Lasso 8.5

Description

[LJAX_HasTarget] accepts the same parameters as the opening [LJAX_Target] tag and returns True if the contents would be included on the current call. This allows LJAX logic to be integrated into custom conditional statements. This tag should only be used when a page is part of an LJAX-enabled solution. More information about how to use LJAX on a site can be found in the Lasso Language Guide.

Lasso pages can accept a -Target action parameter which specifies an LJAX target that should be returned for the page. Lasso pages are normally called with no target. When a site is LJAX-enabled pages will initially be called with no target, then later be called with a specific target in order to dynamically update portions of a page.

The [LJAX_HasTarget] tag accepts a -Target parameter which specifies what LJAX target (specified as a string) or list of targets (specified as an array of strings) the tag should return True for. If specified with an -AnyTarget parameter then the tag will return True when any LJAX target is called.

If specified with a -NoTarget parameter then the tag will return True when no LJAX target is called. If both -NoTarget and -Target are specified then the tag will return True when either no target or the specific LJAX target or targets are called.

Syntax

[LJAX_HasTarget: -NoTarget]

[LJAX_HasTarget: -NoTarget, -Target='content']

[LJAX_HasTarget: -AnyTarget]

Parameters

Optional Parameters
-AnyTarget If specified then the tag will return True when the page is called with any LJAX target.
-NoTarget If specified then the tag will return True when the page is called with no LJAX target.
-Target Accepts either a string or an array of strings. If specified then the tag will return True if the specified target or targets is called.

Change Notes

This tag was added in Lasso 8.5.2.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Related Tags