Lasso Soft Inc. > Home

[isAjax]

LinkisAjax
AuthorKe Carlton
CategoryUtility
Version8.x
LicensePublic Domain
Posted03 Oct 2008
Updated03 Oct 2008
More by this author...

Description

Behold the complexity of this tag - it will intimidate you beyond belief with it's overwhelming internal structure!

Nah, seriously it will simply return true if the current request is an: AJAX, XHR, XMLHTTPRequest request made from the browser...

Sample Usage

local('content') = 'Hello World';

if:isAjax;
  content_body = #content;
else;
  content_body = ''#content'';
/if;

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag:'isAjax',
	-description 	= 'Returns true if call is ajax';
	return(client_headers >> 'XMLHttpRequest');
/define_tag;

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

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