Re: [WebDNA] Checking a radio button

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101628
interpreted = N
texte = --Apple-Mail-11--202975835 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Phil, Thanks a million. It's working now. When I removed the quote marks, the message appeared on the page. Then I put it back inside a [math] block and the error page was displayed and the transaction did not process. When I changed the radio button to yes, it processed as I would expect. Here's how the finished code looked: [showif [math]OK[/math]=1] [showif [_CredCardAgree]=No] [math show=f]OK=0[/math] You failed to agree to the Credit Card Statement. We cannot process online orders unless you have agreed to allow us to charge your credit card for your purchases. Credit Card charges are not disputable after you submit your order. Please back up using your back button and re-enter and double-check the number again. [/showif] [/showif] Thanks for not making me feel stupid. This list is a valuable asset. Tony Miller tmiller@thehawkeye.com On Dec 15, 2008, at 9:40 AM, Paul Willis wrote: > Hi > > The line... > > [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] > > ...having [!] at the start and [/!] at the end means it will never > be processed by WebDNA > > Therefore of your three options one of the first two... > > [showif [math]OK[/math]=1] > > or > > [showif [math]OK[/math]=1] > > ...will always be true and the... > > [showif [_CredCardAgree]="No"] > > ...will never be triggered > > Even if there weren't any [!][/!] blocking the code > [_CredCardAgree] being a radio button will never be blank which is > what [_CredCardAgree]=] is looking for. > > Is one of the options for [_CredCardAgree] actually "No" with the > quotation marks? That is what you are checking for when you put... > > [showif [_CredCardAgree]="No"] > > Try... > > [showif [_CredCardAgree]=No] > > A useful debugging trick is to put the variable somewhere visible > in your page and see what is actually coming through... > > _CredCardAgree= [_CredCardAgree] > > Paul > > > On 15 Dec 2008, at 15:27, Tony Miller wrote: > >> Everyone, >> >> I am a neophite WebDNA user and need some help. I am trying to do >> checking on a radio button to ensure that users have read the >> credit card agreement and have checked the "Yes" button so they >> cannot dispute the charges on their card. I created a variable >> called "_CredCardAgree" and am getting the correct value in the >> email I am sending, but it is not checking. It processes >> regardless of which option is checked. I have taken the following >> code, which all works, except for the _CredCardAgree part, and >> checks for missing fields and invalid credit card numbers: >> >> [math show=f]OK=1[/math] >> >> [showif [_FirstName]=][math show=f]OK=0[/math][/showif] >> [showif [_LastName]=][math show=f]OK=0[/math][/showif] >> [showif [_Address]=][math show=f]OK=0[/math][/showif] >> [showif [_City]=][math show=f]OK=0[/math][/showif] >> [showif [_State]=][math show=f]OK=0[/math][/showif] >> [showif [_Zip]=][math show=f]OK=0[/math][/showif] >> [showif [_Phone]=][math show=f]OK=0[/math][/showif] >> [showif [_Email]=][math show=f]OK=0[/math][/showif] >> [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] >> >> [showif [math]OK[/math]=0] >>

You have not provided information in all of the required >> fields. You must have first and last name, address, city, state, >> zip, phone and valid email address so we can ship your order and >> contact you if there are problems with your order. >>

Please use your browser's Back button to return to the order >> form and complete all of the information.

. >> [/showif] >> >> [showif [math]OK[/math]=1] >> [showif [validcard accountNum=[convertchars db=CleanCard.db] >> [_accountnum][/convertchars]&card=VISA+MC+AMEX]!T] >> [math show=f]OK=0[/math] >> The credit card number entered ([_accountNum]) is not valid. Check >> to make sure you did not mis-type >> any numbers or enter any extra characters. Please back up using >> your back button and re-enter and double-check the number again. >> [/showif] >> [/showif] >> >> [showif [_CredCardAgree]="No"] >> You failed to agree to the Credit Card Statement. We cannot >> process online orders unless you have agreed to allow us to charge >> your credit card for your purchases. Credit Card charges are not >> disputable after you submit your order. Please back up using your >> back button and re-enter and double-check the number again. >> [/showif] >> >> [showif [math]OK[/math]=1] >> >> [orderfile cart=[cart]] >> >> [SetHeader cart=[cart]]&[formvariables name=_&exact=F]&Header >> [Index]=[url][value][/url]&[/formvariables][/SetHeader] >> >>

Your Final Invoice For Order #[cart] Contains the Following >> Items

>> >> I'm reading the programming guide now for insights, but need to >> get this live as soon as possible. (That's a surprise, right?) I >> tried putting it inside a math block like the credit card >> validation, adding it to the first group of "showif"s and it would >> not display an error page. >> >> Thanks for any help in advance. >> >> Tony Miller >> tmiller@thehawkeye.com >> >> >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ > --Apple-Mail-11--202975835 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Phil,

Thanks a million. It's working now. When I = removed the quote marks, the message appeared on the page. Then I put it = back inside a [math] block and the error page was displayed and the = transaction did not process. When I changed the radio button to yes, it = processed as I would expect. Here's how the finished code = looked:

[showif = [math]OK[/math]=3D1]
[showif = [_CredCardAgree]=3DNo]
[math show=3Df]OK=3D0[/math]
Yo= u failed to agree to the Credit Card Statement. We cannot process online = orders unless you have agreed to allow us to charge your credit card for = your purchases. Credit Card charges are not disputable after you submit = your order. Please back up using your back button and re-enter and = double-check the number = again.
[/showif]
[/showif]

Th= anks for not making me feel stupid. This list is a valuable = asset.

On Dec 15, 2008, at 9:40 AM, Paul = Willis wrote:

Hi

The = line...

[!][showif [_CredCardAgree]=3D][math = show=3Df]OK=3D0[/math][/showif][/!]

...having [!] at = the start and [/!] at the end means it will never be processed by = WebDNA

Therefore of your three options one of = the first two...

[showif = [math]OK[/math]=3D1]

or

= [showif [math]OK[/math]=3D1]

...will always = be true and the...

[showif = [_CredCardAgree]=3D"No"]

...will never be = triggered

Even if there weren't any [!][/!] = blocking the code=A0[_CredCardAgree] being a radio button will never be = blank which is what=A0[_CredCardAgree]=3D] is looking = for.

Is one of the options = for=A0=A0[_CredCardAgree] actually "No" with the quotation marks? That = is what you are checking for when you = put...

[showif = [_CredCardAgree]=3D"No"]

Try...

[showif [_CredCardAgree]=3DNo]

A useful = debugging trick is to put the variable somewhere visible in your page = and see what is actually coming = through...

_CredCardAgree=3D=A0[_CredCardAgree]=A0=

Paul


On 15 Dec 2008, at 15:27, Tony Miller wrote:

Everyone,

I am a neophite WebDNA user and need = some help. I am trying to do checking on a radio button to ensure that = users have read the credit card agreement and have checked the "Yes" = button so they cannot dispute the charges on their card. I created a = variable called "_CredCardAgree" and am getting the correct value in the = email I am sending, but it is not checking. It processes regardless of = which option is checked. I have taken the following code, which all = works, except for the _CredCardAgree part, and checks for missing fields = and invalid credit card numbers:

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0[math show=3Df]OK=3D1[/math]

[showif = [_FirstName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_LastName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Address]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_City]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_State]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Zip]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Phone]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Email]=3D][math show=3Df]OK=3D0[/math][/showif]
[!][showif = [_CredCardAgree]=3D][math show=3Df]OK=3D0[/math][/showif][/!]

[show= if [math]OK[/math]=3D0]
<H1>You have not provided information in = all of the required fields. You must have first and last name, address, = city, state, zip, phone and valid email address so we can ship your = order and contact you if there are problems with your = order.
<p>Please use your browser's Back button to return to the = order form and complete all of the = information.</H1>.
[/showif]

[showif = [math]OK[/math]=3D1]
[showif [validcard accountNum=3D[convertchars = db=3DCleanCard.db][_accountnum][/convertchars]&card=3DVISA+MC+AMEX]!T]=
[math show=3Df]OK=3D0[/math]
The credit card number entered = ([_accountNum]) is not valid. Check to make sure you did not = mis-type
any numbers or enter any extra characters. Please back up = using your back button and re-enter and double-check the number = again.
[/showif]
[/showif]

[showif = [_CredCardAgree]=3D"No"]
You failed to agree to the Credit Card = Statement. We cannot process online orders unless you have agreed to = allow us to charge your credit card for your purchases. Credit Card = charges are not disputable after you submit your order. Please back up = using your back button and re-enter and double-check the number = again.
[/showif]

[showif [math]OK[/math]=3D1]

[orderfile = cart=3D[cart]]

[SetHeader cart=3D[cart]]&[formvariables = name=3D_&exact=3DF]&Header[Index]=3D[url][value][/url]&[/formv= ariables][/SetHeader]

<H3>Your Final Invoice For Order #[cart] = Contains the Following Items</H3>

I'm reading the programming = guide now for insights, but need to get this live as soon as possible. = (That's a surprise, right?) I tried putting it inside a math block like = the credit card validation, adding it to the first group of "showif"s = and it would not display an error page.

Thanks for any help in = advance.

Tony Miller
tmiller@thehawkeye.com

<= br>
---------------------------------------------------------
This = message is sent to you because you are subscribed to
the mailing list = <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives= : http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/

= --Apple-Mail-11--202975835-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Checking a radio button (Tony Miller 2008)
  2. Re: [WebDNA] Checking a radio button (Paul Willis 2008)
  3. [WebDNA] Checking a radio button (Tony Miller 2008)
--Apple-Mail-11--202975835 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Phil, Thanks a million. It's working now. When I removed the quote marks, the message appeared on the page. Then I put it back inside a [math] block and the error page was displayed and the transaction did not process. When I changed the radio button to yes, it processed as I would expect. Here's how the finished code looked: [showif [math]OK[/math]=1] [showif [_CredCardAgree]=No] [math show=f]OK=0[/math] You failed to agree to the Credit Card Statement. We cannot process online orders unless you have agreed to allow us to charge your credit card for your purchases. Credit Card charges are not disputable after you submit your order. Please back up using your back button and re-enter and double-check the number again. [/showif] [/showif] Thanks for not making me feel stupid. This list is a valuable asset. Tony Miller tmiller@thehawkeye.com On Dec 15, 2008, at 9:40 AM, Paul Willis wrote: > Hi > > The line... > > [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] > > ...having [!] at the start and [/!] at the end means it will never > be processed by WebDNA > > Therefore of your three options one of the first two... > > [showif [math]OK[/math]=1] > > or > > [showif [math]OK[/math]=1] > > ...will always be true and the... > > [showif [_CredCardAgree]="No"] > > ...will never be triggered > > Even if there weren't any [!][/!] blocking the code > [_CredCardAgree] being a radio button will never be blank which is > what [_CredCardAgree]=] is looking for. > > Is one of the options for [_CredCardAgree] actually "No" with the > quotation marks? That is what you are checking for when you put... > > [showif [_CredCardAgree]="No"] > > Try... > > [showif [_CredCardAgree]=No] > > A useful debugging trick is to put the variable somewhere visible > in your page and see what is actually coming through... > > _CredCardAgree= [_CredCardAgree] > > Paul > > > On 15 Dec 2008, at 15:27, Tony Miller wrote: > >> Everyone, >> >> I am a neophite WebDNA user and need some help. I am trying to do >> checking on a radio button to ensure that users have read the >> credit card agreement and have checked the "Yes" button so they >> cannot dispute the charges on their card. I created a variable >> called "_CredCardAgree" and am getting the correct value in the >> email I am sending, but it is not checking. It processes >> regardless of which option is checked. I have taken the following >> code, which all works, except for the _CredCardAgree part, and >> checks for missing fields and invalid credit card numbers: >> >> [math show=f]OK=1[/math] >> >> [showif [_FirstName]=][math show=f]OK=0[/math][/showif] >> [showif [_LastName]=][math show=f]OK=0[/math][/showif] >> [showif [_Address]=][math show=f]OK=0[/math][/showif] >> [showif [_City]=][math show=f]OK=0[/math][/showif] >> [showif [_State]=][math show=f]OK=0[/math][/showif] >> [showif [_Zip]=][math show=f]OK=0[/math][/showif] >> [showif [_Phone]=][math show=f]OK=0[/math][/showif] >> [showif [_Email]=][math show=f]OK=0[/math][/showif] >> [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] >> >> [showif [math]OK[/math]=0] >>

You have not provided information in all of the required >> fields. You must have first and last name, address, city, state, >> zip, phone and valid email address so we can ship your order and >> contact you if there are problems with your order. >>

Please use your browser's Back button to return to the order >> form and complete all of the information.

. >> [/showif] >> >> [showif [math]OK[/math]=1] >> [showif [validcard accountNum=[convertchars db=CleanCard.db] >> [_accountnum][/convertchars]&card=VISA+MC+AMEX]!T] >> [math show=f]OK=0[/math] >> The credit card number entered ([_accountNum]) is not valid. Check >> to make sure you did not mis-type >> any numbers or enter any extra characters. Please back up using >> your back button and re-enter and double-check the number again. >> [/showif] >> [/showif] >> >> [showif [_CredCardAgree]="No"] >> You failed to agree to the Credit Card Statement. We cannot >> process online orders unless you have agreed to allow us to charge >> your credit card for your purchases. Credit Card charges are not >> disputable after you submit your order. Please back up using your >> back button and re-enter and double-check the number again. >> [/showif] >> >> [showif [math]OK[/math]=1] >> >> [orderfile cart=[cart]] >> >> [SetHeader cart=[cart]]&[formvariables name=_&exact=F]&Header >> [Index]=[url][value][/url]&[/formvariables][/SetHeader] >> >>

Your Final Invoice For Order #[cart] Contains the Following >> Items

>> >> I'm reading the programming guide now for insights, but need to >> get this live as soon as possible. (That's a surprise, right?) I >> tried putting it inside a math block like the credit card >> validation, adding it to the first group of "showif"s and it would >> not display an error page. >> >> Thanks for any help in advance. >> >> Tony Miller >> tmiller@thehawkeye.com >> >> >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ > --Apple-Mail-11--202975835 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Phil,

Thanks a million. It's working now. When I = removed the quote marks, the message appeared on the page. Then I put it = back inside a [math] block and the error page was displayed and the = transaction did not process. When I changed the radio button to yes, it = processed as I would expect. Here's how the finished code = looked:

[showif = [math]OK[/math]=3D1]
[showif = [_CredCardAgree]=3DNo]
[math show=3Df]OK=3D0[/math]
Yo= u failed to agree to the Credit Card Statement. We cannot process online = orders unless you have agreed to allow us to charge your credit card for = your purchases. Credit Card charges are not disputable after you submit = your order. Please back up using your back button and re-enter and = double-check the number = again.
[/showif]
[/showif]

Th= anks for not making me feel stupid. This list is a valuable = asset.

Tony = Miller

On Dec 15, 2008, at 9:40 AM, Paul = Willis wrote:

Hi

The = line...

[!][showif [_CredCardAgree]=3D][math = show=3Df]OK=3D0[/math][/showif][/!]

...having [!] at = the start and [/!] at the end means it will never be processed by = WebDNA

Therefore of your three options one of = the first two...

[showif = [math]OK[/math]=3D1]

or

= [showif [math]OK[/math]=3D1]

...will always = be true and the...

[showif = [_CredCardAgree]=3D"No"]

...will never be = triggered

Even if there weren't any [!][/!] = blocking the code=A0[_CredCardAgree] being a radio button will never be = blank which is what=A0[_CredCardAgree]=3D] is looking = for.

Is one of the options = for=A0=A0[_CredCardAgree] actually "No" with the quotation marks? That = is what you are checking for when you = put...

[showif = [_CredCardAgree]=3D"No"]

Try...

[showif [_CredCardAgree]=3DNo]

A useful = debugging trick is to put the variable somewhere visible in your page = and see what is actually coming = through...

_CredCardAgree=3D=A0[_CredCardAgree]=A0=

Paul


On 15 Dec 2008, at 15:27, Tony Miller wrote:

Everyone,

I am a neophite WebDNA user and need = some help. I am trying to do checking on a radio button to ensure that = users have read the credit card agreement and have checked the "Yes" = button so they cannot dispute the charges on their card. I created a = variable called "_CredCardAgree" and am getting the correct value in the = email I am sending, but it is not checking. It processes regardless of = which option is checked. I have taken the following code, which all = works, except for the _CredCardAgree part, and checks for missing fields = and invalid credit card numbers:

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0[math show=3Df]OK=3D1[/math]

[showif = [_FirstName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_LastName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Address]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_City]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_State]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Zip]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Phone]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Email]=3D][math show=3Df]OK=3D0[/math][/showif]
[!][showif = [_CredCardAgree]=3D][math show=3Df]OK=3D0[/math][/showif][/!]

[show= if [math]OK[/math]=3D0]
<H1>You have not provided information in = all of the required fields. You must have first and last name, address, = city, state, zip, phone and valid email address so we can ship your = order and contact you if there are problems with your = order.
<p>Please use your browser's Back button to return to the = order form and complete all of the = information.</H1>.
[/showif]

[showif = [math]OK[/math]=3D1]
[showif [validcard accountNum=3D[convertchars = db=3DCleanCard.db][_accountnum][/convertchars]&card=3DVISA+MC+AMEX]!T]=
[math show=3Df]OK=3D0[/math]
The credit card number entered = ([_accountNum]) is not valid. Check to make sure you did not = mis-type
any numbers or enter any extra characters. Please back up = using your back button and re-enter and double-check the number = again.
[/showif]
[/showif]

[showif = [_CredCardAgree]=3D"No"]
You failed to agree to the Credit Card = Statement. We cannot process online orders unless you have agreed to = allow us to charge your credit card for your purchases. Credit Card = charges are not disputable after you submit your order. Please back up = using your back button and re-enter and double-check the number = again.
[/showif]

[showif [math]OK[/math]=3D1]

[orderfile = cart=3D[cart]]

[SetHeader cart=3D[cart]]&[formvariables = name=3D_&exact=3DF]&Header[Index]=3D[url][value][/url]&[/formv= ariables][/SetHeader]

<H3>Your Final Invoice For Order #[cart] = Contains the Following Items</H3>

I'm reading the programming = guide now for insights, but need to get this live as soon as possible. = (That's a surprise, right?) I tried putting it inside a math block like = the credit card validation, adding it to the first group of "showif"s = and it would not display an error page.

Thanks for any help in = advance.

Tony Miller
tmiller@thehawkeye.com

<= br>
---------------------------------------------------------
This = message is sent to you because you are subscribed to
the mailing list = <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives= : http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/

= --Apple-Mail-11--202975835-- Tony Miller

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:

Tags not being Interpreted (1999) Yet another db manager (2004) WebDNA 6.0a for Apache 2.2.4 (2007) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Almost a there but..bye bye NetCloak (1997) WebDNA Solutions ... sorry! (1997) Location of Browser Info.txt file (1997) nesting limits? (1998) Funny Math (2000) Re:no [search] with NT (1997) groupSearch help needed (2002) Support ?? (1997) breaking words (1997) Search returns all, not 20 (1997) Dr. Watson Error (1998) default value from Lookup (was Grant, please help me) (1997) RE: redirect with more than 256 characters (1999) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) [ShowIf] and empty fields (1997) filemaker - orderfile (1997)