views:

80

answers:

4

firebug is complaining its there is a syntax error

if (document.getElementById("fromAddress").value == "") || 
(document.getElementById("fromAddress").value == "Enter Address, City, Directions") {   
+7  A: 

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") { 
ChaosPandion
+4  A: 

You need to wrap the entire conditional statement in parans:

if ( (blah) || (blah) )
   ^                  ^
{
  // as you were
}
Michael Haren
+1 for the example code
derekerdmann
+1  A: 

You have mis-match of parenthesis, try this:

if ((document.getElementById("fromAddress").value == "") || 
(document.getElementById("fromAddress").value == "Enter Address, City, Directions")){...}
Sarfraz
+1  A: 

Corrected form: (removed 2 parentheses)

if (document.getElementById("fromAddress").value == "" || document.getElementById("fromAddress").value == "Enter Address, City, Directions") {

Zafer