title: How can I make event.srcElement work in Firefox and what does it mean?
body: <p>there is an if statement on my company's website that makes one web page imcompatible with firefox</p>
  
  <pre><code>if(event.srcElement.getAttribute("onclick") == null){ 
  ...code..
  document.mainForm.submit();
  }
  </code></pre>
  
  <p>I've commented out the if statement conditions and now its working with forefox. My question is, what is event.srcElement.getAttribute("onclick"), is it important, would it cause problems in the future. also, is there something similar i can replace the condition with so that it works on firefox?</p>
  
  <p>Edit:</p>
  
  <pre><code> function gotoRDManagerPT(PTId, bDDetailId) {
          if(!proceed()) return false;
          var target = event.target || event.srcElement; 
          if(event.target.getAttribute("onclick") == null) { 
              document.mainForm.displayRDManagerPT.value = "true";
              document.mainForm.PTId.value = PTId;
              document.mainForm.bDDetailId.value = bDDetailId;
              document.mainForm.submit();
          }
      }
  </code></pre>