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 theinclude tag itself ...&initialize=var1,var2,var3])and use listwords and a modified version of the above within the listwords toinitialize all those vars (assuming all need to equal null, or some common value.)Or why not simply use [textsecure=F]myVar=somevalueWhichYouCanStillOverrideEvenWithWebcat4[/text]since that is now an official documented feature (It is only NOT RECOMMENDED by SMbecause newbies might shoot themselves in the foot with it - ie using an insecure varto 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, otherwise 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:
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 theinclude tag itself ...&initialize=var1,var2,var3])and use listwords and a modified version of the above within the listwords toinitialize all those vars (assuming all need to equal null, or some common value.)Or why not simply use [textsecure=F]myVar=somevalueWhichYouCanStillOverrideEvenWithWebcat4[/text]since that is now an official documented feature (It is only NOT RECOMMENDED by SMbecause newbies might shoot themselves in the foot with it - ie using an insecure varto 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, otherwise 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:
& problem (1999)
Associative lookup style? + bit more (1997)
WebCat2b13MacPlugIn - more [date] problems (1997)
[append] and SSL (1997)
SV: Mass Mail (2000)
Test (2003)
TeaRoom Order fields email account remain empty even though thewy are filled. (1997)
Frames and WebCat (1997)
WC2f3 (1997)
WebCat2.0 [format thousands .0f] no go (1997)
Quick ShowIf question (1997)
Forms Search Questions (1997)
Context and commands (1998)
using WebCat for Associate Programs? (1998)
Calculating Shipping (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Multiple catalog databases and showcart (1997)
carriage returns in data (1997)
template not found error (1998)
mass mailing (1998)