I’ve got an two if() statements, for which the conditions are both met with the default values in the <select> and <input> form fields I’ve tested this by assigning the values to a variable and writing the variable. (0 and Url).
However, it seems that neither if() statement’s contents execute properly.
Here’s a link to my JSFiddle: http://jsfiddle.net/cfRAk/2/
Any edits/answers as to why this is happening would be greatly appreciated!
Here’s the code you’re asking about:
When I set a breakpoint in this click function and then click on the Post Form div,
geo_select_valcomes back as"0"which means thatif(!geo_select_val)will fail becausegeo_select_valdoes have a value so the first if condition will never be executed.Perhaps you want the first if condition to be:
which will tell you if some other value besides the default has been selected (assuming you add other options to that select tag with different values).