Reputation: 44086
firebug is complaining its there is a syntax error
if (document.getElementById("fromAddress").value == "") ||
(document.getElementById("fromAddress").value == "Enter Address, City, Directions") {
Upvotes: 0
Views: 109
Reputation: 2190
Corrected form: (removed 2 parentheses)
if (document.getElementById("fromAddress").value == "" || document.getElementById("fromAddress").value == "Enter Address, City, Directions") {
Upvotes: 1
Reputation: 382909
You have mis-match of parenthesis, try this:
if ((document.getElementById("fromAddress").value == "") ||
(document.getElementById("fromAddress").value == "Enter Address, City, Directions")){...}
Upvotes: 1
Reputation: 108376
You need to wrap the entire conditional statement in parans:
if ( (blah) || (blah) )
^ ^
{
// as you were
}
Upvotes: 4
Reputation: 78302
You are missing the parenthesis, that being said you are better off writing it like this.
var from = document.getElementById("fromAddress").value;
if (from === "" || from === "Enter Address, City, Directions") {
Upvotes: 7