title: Submit form using java script in struts
body: <p>Here is my sample code. I am trying to submit a form using JavaScript. Below code snippet works in all the browsers except IE7 and IE8</p>
  
  <pre><code>function deleteFileName(filename){
      //alert("openPage called" + pageNumber);
      document.forms[0].action = "/DeleteFile.do?filename=" + filename;
      document.forms[0].name = "searchForm";
      document.forms[0].setAttribute("method", "post");
      document.forms[0].submit();
  }
  </code></pre>
  
  <p>Below is exact error message on <code>document.forms[0].acton.....</code> line</p>
  
  <blockquote>
    <p>SCRIPT438: Object doesn't support this property or method</p>
  </blockquote>