numero = 33913
interpreted = N
texte = OK, now I think I get it. You only posted a snip of your code.I assume now that other code on myself.tpl takes the value of '__EXAMPLE' and appliesit to a db field named 'EXAMPLE' (upon form submit), right?...and the code snip you posted is wrapped in a [search] context so that the 'EXAMPLE'field value is available, right?New users who take advantage of storebuilder get something up and running faster thanif they learned the hard way and coded from scratch, but at the loss of knowing whatthe heck is really going on under the hood.--[HTML] (considered OFF TOPIC)--Radio buttons are usually used when you want some var to have one value OR another.(...to pass one value for that var1 OR another value for that var1...)A radio button (within a group of radio buttons who all have the same name) willuncheck itself when you check another radio button with the same name (same var).Checkboxes are usually used when you want some var to have one value (AND possiblyanother value, AND possibly another value...) (...to pass multiple values for thatvar1), or...Checkboxes are usually used when you want var1 to have some value or not, and var2 tohave some value or not, and var3 to have some value or not... (...to maybe or maybenot pass a value for var1, and maybe or maybe not pass a value for var2, etc.)Checkboxes are independant of one another in the sense that you can check a box on oroff whether or not other checkboxes are checked.If you want to be able to uncheck a radio button that has been checked by the [showif],then you either have to provide an alternate radio button with a different value butthe SAME name, OR else you should use a checkbox instead of the radio button.Whether radio button or checkbox: the HTML form will only send var/value pairs (e.g.SomeVar=SomeValue) into the page indicated by the form action for the radios/checkboxeswhich ARE checked.--[/HTML]----[WEBCAT]--Webcat receives whatever var/value pairs your HTML form has sent to it from thepreceding page. It handles them according to your webat code and then returns theresulting HTML.If you have a db field named example BUT the variable that was passed into a page (apage that you believe is updating the example field properly) is actually called__example, AND somehow it still seems to work right, then it is probably because the[append] or [replace] (whatever is updating the db fields) has this within itsconfines:[formvariables name=__&exact=F][getcharsstart=3][name][/getchars]=[URL][value][/URL]&[/formvariables]right?That code in english:for each variable passed into this page via form or URL whose name starts with __ (2underscores), return this code:(nameOFTheVar)=[URL](ValueOfTheVar)[/URL]&So take the example of the __example var that we pass in to such a page:[Replace db=some.db&eqKEYFIELDdatarq=[KEYFIELD]][formvariablesname=__&exact=F][getcharsstart=3][name][/getchars]=[url][value][/url]&[/formvariables][/Replace], would become:[Replace db=some.db&eqKEYFIELDdatarq=[KEYFIELD]]example=[url]Y[/url]&[/Replace]which updates the 'example' field with a value of Y for the indicated record(s).--[/WEBCAT]--HTH. If that does explain things well enough that you now know how it works, would youmind helping the next new guy to come in here asking the same question? ;-)-JohnParker wrote:> On Thu, 29 Jun 2000 10:53:21> John Butler wrote:> > Which is why it seems even more bizarre to me that Parker> > you are saying that the radio> > button (we usually don't call these checkboxes, which> > act differently) cannot be> > UNCHECKED after form submission (implying it is checked> > after you submit the form).>> Yes. The form submits to itself. I check the radio button> which of course sets my database field to Y (or whatever I> want in the value.. should I make it T... will then a> boolean be set? I'll look into that.. doesn't seem like it> would matter in this case). Then the resulting page (itself> again) shows the button checked because of the [showif]> snippet.. good that's what I want, but I cannot then uncheck> this button. So I need to tell the page somehow that if the> radio button _is_ checked then I want to be able to uncheck> it. I can use menu pulldown code very easily here as it's> simply a yes/no situation, but would like to use this more> compact solution if possible.>> Again the code I'm using (modified from storebuilder code..> see below):>> >> I think I may be confusing checkbox and radio button> functionality a bit here. Can someone reply with a> functioning radio button that sets values in a database> based on whether it's checked or not? Thanks... see below> still...>> > Assuming your [showif] is all on one line, then the> > syntax looks right, and so the> > radio button should *not* be checked after form> > submission since __EXAMPLE=Y, which> > does *not* mean EXAMPLE=Y.> [snip]> > > [example] and [__example] are not the same thing.>> I'm a little confused. This is only my 5th or 6th webcat> project so I'm just modifying the default StoreBuilder> /admin/products.inc to fit the current store I'm working on.> _Everywhere_ I see this __VARIABLE and [VARIABLE] accessing> the same information. ex. > etc. So I'm just mimicing the default code. It works...> always has. I understand the logic of what you're saying of> course with the naming conventions. So I'm sure you can see> why I'm a little confused since this code is everywhere I> look. ;)>>-------------------------------------------------------------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:
OK, now I think I get it. You only posted a snip of your code.I assume now that other code on myself.tpl takes the value of '__EXAMPLE' and appliesit to a db field named 'EXAMPLE' (upon form submit), right?...and the code snip you posted is wrapped in a [search] context so that the 'EXAMPLE'field value is available, right?New users who take advantage of storebuilder get something up and running faster thanif they learned the hard way and coded from scratch, but at the loss of knowing whatthe heck is really going on under the hood.--[HTML] (considered OFF TOPIC)--Radio buttons are usually used when you want some var to have one value OR another.(...to pass one value for that var1 OR another value for that var1...)A radio button (within a group of radio buttons who all have the same name) willuncheck itself when you check another radio button with the same name (same var).Checkboxes are usually used when you want some var to have one value (AND possiblyanother value, AND possibly another value...) (...to pass multiple values for thatvar1), or...Checkboxes are usually used when you want var1 to have some value or not, and var2 tohave some value or not, and var3 to have some value or not... (...to maybe or maybenot pass a value for var1, and maybe or maybe not pass a value for var2, etc.)Checkboxes are independant of one another in the sense that you can check a box on oroff whether or not other checkboxes are checked.If you want to be able to uncheck a radio button that has been checked by the [showif],then you either have to provide an alternate radio button with a different value butthe SAME name, OR else you should use a checkbox instead of the radio button.Whether radio button or checkbox: the HTML form will only send var/value pairs (e.g.SomeVar=SomeValue) into the page indicated by the form action for the radios/checkboxeswhich ARE checked.--[/HTML]----[WEBCAT]--Webcat receives whatever var/value pairs your HTML form has sent to it from thepreceding page. It handles them according to your webat code and then returns theresulting HTML.If you have a db field named example BUT the variable that was passed into a page (apage that you believe is updating the example field properly) is actually called__example, AND somehow it still seems to work right, then it is probably because the[append] or [replace] (whatever is updating the db fields) has this within itsconfines:[formvariables name=__&exact=F][getcharsstart=3][name][/getchars]=[url][value][/URL]&[/formvariables]right?That code in english:for each variable passed into this page via form or URL whose name starts with __ (2underscores), return this code:(nameOFTheVar)=[url](ValueOfTheVar)[/URL]&So take the example of the __example var that we pass in to such a page:[Replace db=some.db&eqKEYFIELDdatarq=[KEYFIELD]][formvariablesname=__&exact=F][getcharsstart=3][name][/getchars]=[url][value][/url]&[/formvariables][/Replace], would become:[Replace db=some.db&eqKEYFIELDdatarq=[KEYFIELD]]example=[url]Y[/url]&[/Replace]which updates the 'example' field with a value of Y for the indicated record(s).--[/WEBCAT]--HTH. If that does explain things well enough that you now know how it works, would youmind helping the next new guy to come in here asking the same question? ;-)-JohnParker wrote:> On Thu, 29 Jun 2000 10:53:21> John Butler wrote:> > Which is why it seems even more bizarre to me that Parker> > you are saying that the radio> > button (we usually don't call these checkboxes, which> > act differently) cannot be> > UNCHECKED after form submission (implying it is checked> > after you submit the form).>> Yes. The form submits to itself. I check the radio button> which of course sets my database field to Y (or whatever I> want in the value.. should I make it T... will then a> boolean be set? I'll look into that.. doesn't seem like it> would matter in this case). Then the resulting page (itself> again) shows the button checked because of the [showif]> snippet.. good that's what I want, but I cannot then uncheck> this button. So I need to tell the page somehow that if the> radio button _is_ checked then I want to be able to uncheck> it. I can use menu pulldown code very easily here as it's> simply a yes/no situation, but would like to use this more> compact solution if possible.>> Again the code I'm using (modified from storebuilder code..> see below):>> >> I think I may be confusing checkbox and radio button> functionality a bit here. Can someone reply with a> functioning radio button that sets values in a database> based on whether it's checked or not? Thanks... see below> still...>> > Assuming your [showif] is all on one line, then the> > syntax looks right, and so the> > radio button should *not* be checked after form> > submission since __EXAMPLE=Y, which> > does *not* mean EXAMPLE=Y.> [snip]> > > [example] and [__example] are not the same thing.>> I'm a little confused. This is only my 5th or 6th webcat> project so I'm just modifying the default StoreBuilder> /admin/products.inc to fit the current store I'm working on.> _Everywhere_ I see this __VARIABLE and [VARIABLE] accessing> the same information. ex. > etc. So I'm just mimicing the default code. It works...> always has. I understand the logic of what you're saying of> course with the naming conventions. So I'm sure you can see> why I'm a little confused since this code is everywhere I> look. ;)>>-------------------------------------------------------------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
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...