title: calling a js method from the body of html code and take in variable for method
body: <p>I had this html code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;title&gt; Upload Malware File &lt;/title&gt;
  &lt;body&gt;
      &lt;header id = "header"&gt;
          &lt;h1 align="center"&gt;Upload Malware File&lt;/h1&gt;
          &lt;p align="center"&gt; Please choose the malware file you want to upload.&lt;/p&gt;
      &lt;/header&gt;
  
  
      &lt;form method="post" enctype="multipart/form-data" action="malware_upload.php"&gt;
          Select malware file to upload:
          &lt;input type="file" name="file"required&gt;
  
          &lt;form method="post" enctype="multipart/form-data"&gt;
              &lt;div &gt;
                  &lt;label for="mname"&gt;&lt;b&gt;Malware Name&lt;/b&gt;&lt;/label&gt;
      &lt;input type="text" placeholder="Malware Name" name="mname" &lt;required&gt; *HERE*
              &lt;/div&gt;
              &lt;div &gt;
                  &lt;label for="uname"&gt;&lt;b&gt;Admin Username&lt;/b&gt;&lt;/label&gt;
                  &lt;input type="text" placeholder="Enter Username" name="uname" required&gt;
              &lt;/div&gt;
  
              &lt;div&gt;
                  &lt;label for="psw"&gt;&lt;b&gt;Admin Password&lt;/b&gt;&lt;/label&gt;
                  &lt;input type="password" placeholder="Enter Password" name="psw" required&gt;
              &lt;/div&gt;
              &lt;input type="submit" value="Upload" name="submit"&gt;
          &lt;/form&gt;
      &lt;/form&gt;
  
      &lt;form&gt;
          &lt;input type="submit" formaction="file_upload.php" value="Go to File Uploads" /&gt;
          &lt;input type="submit" formaction="CreateAdmin.php" name="SI" value="Sign In" /&gt;
      &lt;/form&gt;
  
  &lt;form method="post" enctype="multipart/form-data"&gt;
          &lt;input type="submit" name = "logout" value="Logout" /&gt; 
          &lt;/form&gt;
  </code></pre>
  
  <p>Now I have this method:</p>
  
  <pre><code>function checkMalwareName(string)
  {
     return ("/^[a-zA-Z0-9]+$/").test(string)
  }
  </code></pre>
  
  <p>How will i be able to call the checkMalwareName at the "<em>HERE</em>" marker in the html code cleanly and return an error if it is false?</p>