[HideIf Comparison]Hide This HTML[/HideIf]
numero = 179hideif 'does the correct thing' when it hides its container: any contexts inside the [ hideif ] container (e.g. [append] or [replace] or [delete]) will NOT be executed if hideif evaluates to true.
Example (normally you would put the following text into a .dna file on your server and use a web browser to link to it):[hideif [username]=Grant][Authenticate User Grant][/hideif]Comparisons are always case-insensitive so "grant" equals "GRANT".
Comparison | Example | |
---|---|---|
equal | = | [hideif [username]=SAGEHEN]You're not Mr. Sagehen![/hideif] |
not equal | [hideif [random]!45]...[/hideif] | |
contains | ^ | [hideif [browsername]^Mozilla]...[/showif] |
begins with | ~ | [hideif [ipaddress]~245.078.013]...[/hideif]. Notice the IP address has been typed with 3 digits in each portion of the address. This is very important for making these comparison work as expected. |
less than | < | [hideif [random]<50]...[/hideif] |
greater than | > | [hideif [lastrandom]>25]...[/hideif] |
divisible by | \ | [hideif [index]\3]...[/hideif] |
if both sides of the equation are numbers, then the comparison for greater than, less than, and equals is performed numerically. If either side is not a number, then the comparison is performed alphabetically.
make sure neither side of the comparison equation contains any of the special comparison letters listed above. For example, [hideif I'm Friendly! Are you?=[question]] contains an exclamation point inside the sentence being compared, so WebDNA sees this as "I'm Friendly" is not equal to " Are you?=[question]", which is not what the author meant to compare.
The solution is to wrap each side of the comparison with [URL] contexts, like this:
[hideif [URL]I'm Friendly! Are you?[/URL]=[URL][question][/URL]]. This causes any embedded ! = > < symbols to be converted to their URL equivalents, which can then be compared correctly.
hideif 'does the correct thing' when it hides its container: any contexts inside the [ hideif ] container (e.g. [append] or [replace] or [delete]) will NOT be executed if hideif evaluates to true.
[hideif [username]=Grant][Authenticate User Grant][/hideif]
Comparison | Example | |
---|---|---|
equal | = | [hideif [username]=SAGEHEN]You're not Mr. Sagehen![/hideif] |
not equal | [hideif [random]!45]...[/hideif] | |
contains | ^ | [hideif [browsername]^Mozilla]...[/showif] |
begins with | ~ | [hideif [ipaddress]~245.078.013]...[/hideif]. Notice the IP address has been typed with 3 digits in each portion of the address. This is very important for making these comparison work as expected. |
less than | < | [hideif [random]<50]...[/hideif] |
greater than | > | [hideif [lastrandom]>25]...[/hideif] |
divisible by | \ | [hideif [index]\3]...[/hideif] |
if both sides of the equation are numbers, then the comparison for greater than, less than, and equals is performed numerically. If either side is not a number, then the comparison is performed alphabetically.
make sure neither side of the comparison equation contains any of the special comparison letters listed above. For example, [hideif I'm Friendly! Are you?=[question]] contains an exclamation point inside the sentence being compared, so WebDNA sees this as "I'm Friendly" is not equal to " Are you?=[question]", which is not what the author meant to compare.
The solution is to wrap each side of the comparison with [url] contexts, like this:
[hideif [url]I'm Friendly! Are you?[/URL]=[url][question][/URL]]. This causes any embedded ! = > < symbols to be converted to their URL equivalents, which can then be compared correctly.
DOWNLOAD WEBDNA NOW!
A compilation of some user's questions...
[biotype]BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
Download WebDNA ApplicationsWebDNA applications...
WebDNA ModulesA list of the currently available modules...
Tips and TricksA list of user-submitted tips ...
WebDNA LibrariesA list of available libraries for WebDNA...
To apply formats for Dates or Times other than the current date and time...
[date]Putting [date] in your template displays the current date as defined by the clock on your web server...
[version]...
[ipaddress]Displays the ip address of the remote computer...
[browsername]Displays the browser name...
[random]will display a random number...