numero = 20513
interpreted = N
texte = >>A simple example would be a form with several checkboxes. Currently there>>is a lot of code out there that deals with it like this:>>>> [Append ...]CheckBox1=[ShowIf>>[CheckBox1]=[raw][CheckBox1][/raw]]F[/ShowIf][HideIf>>[CheckBox1]=[raw][CheckBox1][/raw]][CheckBox1]&CheckBox2=[ShowIf>>[CheckBox2]=[raw][CheckBox2][/raw]]F[/ShowIf][HideIf>>[CheckBox2]=[raw][CheckBox2][/raw]][CheckBox2][/Append]>>>>Every time you want to use a checkbox value, you have to go through the>>whole [ShowIf]/[HideIf] routine again. What a drag.There's an easier way, just put one of these immediately before the ending tag :for every checkbox in that form. Then if a checkbox is checked a T (or whatever other value you give it) will be passed for that checkbox, and if it's not checked, a F will be passed.Actually when it's checked, a T will be passed first, then a F will be passed later, but since browsers always pass form values in the same order as they appear on the form, and since webcat ignores all but the first value for each variable passed, this little tricks works just fine ... :)Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>>A simple example would be a form with several checkboxes. Currently there>>is a lot of code out there that deals with it like this:>>>> [Append ...]CheckBox1=[ShowIf>>[CheckBox1]=[raw][CheckBox1][/raw]]F[/ShowIf][HideIf>>[CheckBox1]=[raw][CheckBox1][/raw]][CheckBox1]&CheckBox2=[ShowIf>>[CheckBox2]=[raw][CheckBox2][/raw]]F[/ShowIf][HideIf>>[CheckBox2]=[raw][CheckBox2][/raw]][CheckBox2][/Append]>>>>Every time you want to use a checkbox value, you have to go through the>>whole [showif]/[hideif] routine again. What a drag.There's an easier way, just put one of these immediately before the ending tag :for every checkbox in that form. Then if a checkbox is checked a T (or whatever other value you give it) will be passed for that checkbox, and if it's not checked, a F will be passed.Actually when it's checked, a T will be passed first, then a F will be passed later, but since browsers always pass form values in the same order as they appear on the form, and since webcat ignores all but the first value for each variable passed, this little tricks works just fine ... :)Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
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...