// HazaaZOOZ - javascript - check if the element exists in javascript var myEle = document.getElementById("myElement"); if(myEle){ var myEleValue= myEle.value; }