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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -