Question : Function needs help with if this or this then that

Hi, I've got this function here that I need to work on 2 levels.

function subit_confirm_update(){
      if((document.getElementById("savestatus").innerHTML=='') or (document.getElementById("savestatus").innerHTML=='Saved')){
            alert("No update needed.");
            return false;
      }
}

though this doesn't work, would anyone provide a working function for this example?

Answer : Function needs help with if this or this then that

Could you please mention what your code is trying to do (exact reqquirements) at first place?

var value = document.getElementById("savestatus").innerHTML;

if ( value.length  == 0 || value == "Saved")
{
              alert("No update needed.");
            return false;
}
Random Solutions  
 
programming4us programming4us