Re: weening me off overwriting form variables. John Peacock?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 36517
interpreted = N
texte = I don't remember Joe,but (and maybe this is obvious)You now can simply check if a var has not been passed in and then initialize it with [text][showif [url][myVar][/url]=[url][raw][myVar][/raw][/url]] [text]myVar=what_I_have_been_assigning_since_webcat3[/text] [/showif] You could write an include that goes thru a list of vars (a list you stick in the include tag itself ...&initialize=var1,var2,var3]) and use listwords and a modified version of the above within the listwords to initialize all those vars (assuming all need to equal null, or some common value.)Or why not simply use [text secure=F]myVar=somevalueWhichYouCanStillOverrideEvenWithWebcat4[/text] since that is now an official documented feature (It is only NOT RECOMMENDED by SM because newbies might shoot themselves in the foot with it - ie using an insecure var to determine authorized access, etc.)(which reminds me, maybe this is what you were asking for in the 1st place:+++++++++++++++++++I nearly forgot, you need to escape the & in the replace string, other wise it doesn't work right. That makes itSearch: \[text ([^\]]#)\] or \[text ([^]]*)\] (for BBEdit) Replace: \[text \0\&secure=f\]John PeacockJohn Peacock wrote: > > The string [^\]] (or [^]] apparently under BBEdit) is a negative set. > It will match every character that is not in the set, that is to say, > anything not a right bracket. Whether you have to escape the ] in the > expression is based on the exact implementation. I just tested it in > MultiEdit with the various example strings you (and others) included, > and discovered that MultiEdit will die screaming if you do not escape > the ], but that my search strings worked like I designed them. > > I can also highly recommend the O'Reilly RegEx book. One of the things > about Perl especially is that after enough experience with regex, you > discover that almost everything can be fixed with the correct regex. > > HTH > > John Peacock > > Kenneth Grome wrote: > > > > >On 5/3/00 3:55 pm, Jereme Claussen so noted... > > > > > >>BBEdit has an option titled Use Grep which uses standard RegEx for > > >>those concerned.. > > >> > > >>>Or if you have an editor with regex support, you can make two passes: > > >>> > > >>>Search: \[text ([^\]]#)\] > > >>>Replace: \[text \0&secure=f\] > > > > > >Slight modifications are needed for BBEdit Lite 4.6 (and I assume BBEdit > > >as well): > > > > > >Search: \[text ([^]]*)\] > > >Replace: \[text \1\&secure=f\] > >Joseph D'Andrea wrote:> In anticipation of someday installing the WebCat 4 we purchased way > back when... I need to remove the coding technique where we relied > on eing able to overwrite incoming form variables. You know, the > technique where you set text variables with the same name as incoming > form variables to empty so you can display input forms pretty. > > I think John Peacock, or someone, posted a solution to this problem > that I have since lost. I tried searching the archives, but haven't > found it yet. > > Does anyone remember the solution that John posted? > > John? > > Thanks, > ___Joe___ > _________________________________________________ > Joseph D'Andrea JoeDan@West21.com > WEST21.com Internet services for the 21st Century > http://www.west21.com/ > _________________________________________________ > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: weening me off overwriting form variables. John Peacock? (Joseph D'Andrea 2000)
  2. Re: weening me off overwriting form variables. John Peacock? (Kenneth Grome 2000)
  3. Re: weening me off overwriting form variables. John Peacock? (John Butler 2000)
  4. Re: weening me off overwriting form variables. John Peacock? (anup setty 2000)
  5. weening me off overwriting form variables. John Peacock? (Joseph D'Andrea 2000)
I don't remember Joe,but (and maybe this is obvious)You now can simply check if a var has not been passed in and then initialize it with [text][showif [url][myVar][/url]=[url][raw][myVar][/raw][/url]] [text]myVar=what_I_have_been_assigning_since_webcat3[/text] [/showif] You could write an include that goes thru a list of vars (a list you stick in the include tag itself ...&initialize=var1,var2,var3]) and use listwords and a modified version of the above within the listwords to initialize all those vars (assuming all need to equal null, or some common value.)Or why not simply use [text secure=F]myVar=somevalueWhichYouCanStillOverrideEvenWithWebcat4[/text] since that is now an official documented feature (It is only NOT RECOMMENDED by SM because newbies might shoot themselves in the foot with it - ie using an insecure var to determine authorized access, etc.)(which reminds me, maybe this is what you were asking for in the 1st place:+++++++++++++++++++I nearly forgot, you need to escape the & in the replace string, other wise it doesn't work right. That makes itSearch: \[text ([^\]]#)\] or \[text ([^]]*)\] (for BBEdit) Replace: \[text \0\&secure=f\]John PeacockJohn Peacock wrote: > > The string [^\]] (or [^]] apparently under BBEdit) is a negative set. > It will match every character that is not in the set, that is to say, > anything not a right bracket. Whether you have to escape the ] in the > expression is based on the exact implementation. I just tested it in > MultiEdit with the various example strings you (and others) included, > and discovered that MultiEdit will die screaming if you do not escape > the ], but that my search strings worked like I designed them. > > I can also highly recommend the O'Reilly RegEx book. One of the things > about Perl especially is that after enough experience with regex, you > discover that almost everything can be fixed with the correct regex. > > HTH > > John Peacock > > Kenneth Grome wrote: > > > > >On 5/3/00 3:55 pm, Jereme Claussen so noted... > > > > > >>BBEdit has an option titled Use Grep which uses standard RegEx for > > >>those concerned.. > > >> > > >>>Or if you have an editor with regex support, you can make two passes: > > >>> > > >>>Search: \[text ([^\]]#)\] > > >>>Replace: \[text \0&secure=f\] > > > > > >Slight modifications are needed for BBEdit Lite 4.6 (and I assume BBEdit > > >as well): > > > > > >Search: \[text ([^]]*)\] > > >Replace: \[text \1\&secure=f\] > >Joseph D'Andrea wrote:> In anticipation of someday installing the WebCat 4 we purchased way > back when... I need to remove the coding technique where we relied > on eing able to overwrite incoming form variables. You know, the > technique where you set text variables with the same name as incoming > form variables to empty so you can display input forms pretty. > > I think John Peacock, or someone, posted a solution to this problem > that I have since lost. I tried searching the archives, but haven't > found it yet. > > Does anyone remember the solution that John posted? > > John? > > Thanks, > ___Joe___ > _________________________________________________ > Joseph D'Andrea JoeDan@West21.com > WEST21.com Internet services for the 21st Century > http://www.west21.com/ > _________________________________________________ > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Butler

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:

Proper file locations (1997) bug in [SendMail] (1997) WebDNA versus ASP [OT] (2002) email problem (1998) EmailCompleted Clean Up (2001) Tea Room trouble (1997) Targeting [redirect] to a frame? (1998) Threaded Discussion (1998) RE: [WebDNA] directory protection questions (2008) WebCat2 several catalogs? (1997) CommandSecurity? (1997) Price recalc based on quantity (1997) Emailer not working (1998) Changing SubTotal (2003) Associative lookup style? (1997) trouble updating records in database (1998) Bug Report, maybe (1997) Signal Raised Error (Part II) (1997) forms and variables (1998) TCPSend / Netscape Server 4.1 (2003)