Cart Javascript Checkers...

General ShopSite user discussion

Cart Javascript Checkers...

Postby Chris » Thu Mar 31, 2005 8:31 am

Hi all,

I admit I need help. I have the following:

if
(document.billing.ShipCountry.options[document.billing.ShipCountry.
se lectedIndex].value != "United States" &&
document.billing.field01.checked == false) {error += " International
customers must assume responsibility for duties and taxes. Please
check the box!";}


but it doesn't seem to be working. I want to make sure that if the
shipping country is not US, then the custom field that is the customs
duties checkbox is checked. If not, an alert should appear. It doesn't
seem to work.

What am I missing?

Thanks!

Chris

mlcswoodworking.com
Chris
 

Re: Cart Javascript Checkers...

Postby loren_d_c » Thu Mar 31, 2005 9:16 am

Worked for me. Make sure that you have everything on the right lines.
It's ok for lines to wrap in the input box, however you should not have
any hard returns in places they shouldn't be. Basically, you should not
have any hard returns in the if conditional statement, or in the error
message assignment.

Oh, and your custom checkout fields have to be set up correctly as well.
Does the field01 custom checkout field work?

-Loren



Chris wrote:
Hi all,

I admit I need help. I have the following:

if
(document.billing.ShipCountry.options[document.billing.ShipCountry.
se lectedIndex].value != "United States" &&
document.billing.field01.checked == false) {error += " International
customers must assume responsibility for duties and taxes. Please
check the box!";}


but it doesn't seem to be working. I want to make sure that if the
shipping country is not US, then the custom field that is the customs
duties checkbox is checked. If not, an alert should appear. It doesn't
seem to work.

What am I missing?

Thanks!

Chris

mlcswoodworking.com
loren_d_c
 
Posts: 2570
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Cart Javascript Checkers...

Postby Chris » Thu Mar 31, 2005 3:29 pm

Works now.....it must have been the hard returns from copying and pasting from
mail and .txt files.

Thanks!

Oh, the custom field has always functioned properly.

Chris

mlcswoodworking.com

Loren wrote:

Worked for me. Make sure that you have everything on the right lines.
It's ok for lines to wrap in the input box, however you should not have
any hard returns in places they shouldn't be. Basically, you should not
have any hard returns in the if conditional statement, or in the error
message assignment.

Oh, and your custom checkout fields have to be set up correctly as well.
Does the field01 custom checkout field work?

-Loren

Chris wrote:
Hi all,

I admit I need help. I have the following:

if
(document.billing.ShipCountry.options[document.billing.ShipCountry.
se lectedIndex].value != "United States" &&
document.billing.field01.checked == false) {error += " International
customers must assume responsibility for duties and taxes. Please
check the box!";}


but it doesn't seem to be working. I want to make sure that if the
shipping country is not US, then the custom field that is the customs
duties checkbox is checked. If not, an alert should appear. It doesn't
seem to work.

What am I missing?

Thanks!

Chris

mlcswoodworking.com
Chris
 


Return to User Forum

Who is online

Users browsing this forum: Google [Bot] and 69 guests