how to execute html tag in javascript
===

my database calls certain functions by inserting commands inside angle brackets. i.e.<#SUBMIT  title="Request Report"> will create a button that submits form (criteria) data to the engine for reporting. 

Before that button gets clicked I want to check some date criteria so I have inserted an image link into my document which calls my javascript code. If all conditions are met I want it to run/click the above button. Here is my code, it all works until the <#submit> part. Any suggestions would be gratefully welcome.

    function checkdate() {
      
      var currentTime = new Date();
      var startdate = document.forms[0].datescopestart.value;
      var startdate2 = startdate.split("/");
      var startdate3 = new Date(startdate2[2], startdate2[1]-1, startdate2[0]);	
      var totaldays = ((currentTime - startdate3)/86400000);
      
      if (totaldays >100) {
    	  
    	  alert("You can only choose a start date within the last 100 days") }
      
      
      else if (startdate ==""){
    	  alert("You cannot leave the start date blank")
    	  }
      
      
      else {
    	  ("<#SUBMIT>")
    	  }
    	  }