JavaScript Boolean Values -


am setting boolean values right? because it's not working me. basically, on website, want 1 alert message popping (starting earliest pop later one) until fields have been checked.


example:

1) validate pizza size (user selected pizza size)

2) validate toppings (user did not select pizza size)

3) validate text area (user did not select pizza size)

result: pop #2 comes stating "select jalapeno!" , not pop #3 (if makes sense)


here javascript:

http://pastebin.com/6c2cxu5x

it's javascript...

pizzasizeelement.value = "" 

to compare, should be:

pizzasizeelement.value == ""  

or if want ensure comparing of same type (string) then:

pizzasizeelement.value === ""  

Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -