Re: [WebDNA] Check if variable is blank or is raw or third condition
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105131
interpreted = N
texte = I always set my text variables to blank values at the top of the page. Then it's easier to code for matching blank or raw values further on down the page:[text secure=f]var=[/text][showif something=[var]]what you see with a match[/showif]Sincerely,Kenneth Grome> To be clear here is exactly what I'm trying to do in one hideif (if> possible): Hide everything if either of these 3 conditions are met:> [t_username] is blank OR [t_username] is [t_username] OR> [t_username]^Exactly this text.> > Please someone clarify or break this down for me.> > The Webdna Syntax tutorial video part 3 of 4 talks about a hideif context> that hides content based on a variable being blank or raw.> > The code is as follows:> > [hideif ||[raw][t_username][/raw]|^|[t_username]|]> > Basically saying if [t_username] is not initialized we're going to hide> everything.> I understand that it basically amounts to comparing |[t_username]| that> contains |[t_username]| but I cannot figure out why the extra pipe character> is on the left. I've also seen it this way:> > [hideif |[raw][t_username][/raw]||^|[t_username]|]> > Do they both function exactly the same? Are they all pipe delimiters or does> one refer to an OR?> > I would like to modify the code to contain an OR in the same hideif to also> compare [t_username]^Exactly this text> > I'm stuck on how to do this due to my confusion with the syntax.> > Thanks in advance!> Mike S> > Mike Sargent> Web Designer> Earthcare Technologies, Inc.> 7406 Alban Station Court Suite B-210> Springfield, VA 22150> Phone 703-644-5399> Fax 703-644-5384> > >
Associated Messages, from the most recent to the oldest:
I always set my text variables to blank values at the top of the page. Then it's easier to code for matching blank or raw values further on down the page:[text secure=f]var=[/text][showif something=[var]]what you see with a match[/showif]Sincerely,Kenneth Grome> To be clear here is exactly what I'm trying to do in one hideif (if> possible): Hide everything if either of these 3 conditions are met:> [t_username] is blank OR [t_username] is [t_username] OR> [t_username]^Exactly this text.> > Please someone clarify or break this down for me.> > The Webdna Syntax tutorial video part 3 of 4 talks about a hideif context> that hides content based on a variable being blank or raw.> > The code is as follows:> > [hideif ||
[raw][t_username][/raw]|^|[t_username]|]> > Basically saying if [t_username] is not initialized we're going to hide> everything.> I understand that it basically amounts to comparing |[t_username]| that> contains |[t_username]| but I cannot figure out why the extra pipe character> is on the left. I've also seen it this way:> > [hideif |
[raw][t_username][/raw]||^|[t_username]|]> > Do they both function exactly the same? Are they all pipe delimiters or does> one refer to an OR?> > I would like to modify the code to contain an OR in the same hideif to also> compare [t_username]^Exactly this text> > I'm stuck on how to do this due to my confusion with the syntax.> > Thanks in advance!> Mike S> > Mike Sargent> Web Designer> Earthcare Technologies, Inc.> 7406 Alban Station Court Suite B-210> Springfield, VA 22150> Phone 703-644-5399> Fax 703-644-5384> > >
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCat2b12 forgets serial # (1997)
Uh...can someone help me out with the b10? (1997)
Grant, please help me ... (1997)
PCS Customer submissions ? (1997)
WriteFile and returns... (2000)
Separate SSL Server (1997)
Emailer Problem (1999)
Hiding HTML and page breaks (1997)
access denied problem (1997)
Using Plug-In while running 1.6.1 (1997)
How to include weather (2000)
pc (1997)
[taxRate] [TaxTotal] ? (1997)
[WebDNA] .htm files (2008)
re: keep W* in front applescript? (try Cron) (1998)
Header Problems (1998)
truncating email part II (1997)
Document Contains No Data! (1997)
Protect (1997)
Help with Repost Data msg from form (1997)