Javascript and form states

I have a javascript I inherited and it seems that the if conditionals are not working correctly.

After reviewing it and trying some adjustments in how the elements are selected, I'm still baffled with the if conditional if ('foo' == "BAR") and why they are not interpreting the way the scripter expected.

Experts please have a look and make some n00b suggestions for me? Thanks!
LVL 11
Who is Participating?
kblack05Author Commented:
First thing I'm curious about is that

function changeCountry(country) {
    if (country == 'US') {

produces a syntax error. It seems there are many ways to do the conditional formatting, so perhaps comparing a variable imported by the function must have double quotes?
kblack05Author Commented:
shopping cart script needs mod
Julian HansenCommented:
Not sure what the qustion is here? Can you elaborate?
kblack05Author Commented:
The script is broken in several places, not practical for experts to answer.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.