title: Form submit with post not working in Chrome, but it works in firefox and IE
body: <p>I have been looking at this for hours.  Here are the one i have looked at.</p>
  
  <p><a href="https://stackoverflow.com/questions/17418738/jquery-submit-not-working-in-chrome">JQuery submit not working in Chrome</a></p>
  
  <p>i also looked into the jquery submit</p>
  
  <p><a href="http://api.jquery.com/submit/" rel="nofollow noreferrer">http://api.jquery.com/submit/</a></p>
  
  <p>None of the solutions there are working for me.</p>
  
  <p>Problem:  I have a form that has a button that has a onclick that calls a javascript method.  Then I have another form on the page (not in the other form outside it) that is a post form.  In the javascript i call .submit() on that form.  It works in Firefox, and IE, but not in Chrome, in chrome it reloads the page and keeps it on the same page.  Firefox and IE open the new tab with the post page correctly.  Here is the code:</p>
  
  <pre><code> &lt;h:form id="mainForm&gt;
    ...
       &lt;h:commandLink id="testUrlButtonPost" onclick="submitPage()" 
          styleClass="secondaryButton" value="#{__VendorAdmin.test}"/&gt;
    ...
  &lt;/h:form&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
       function submitPage() {                             
           var url = $('#addEditCatalogForm\\:baseURL').val();
           document.getElementById("TestForm").action=url;
           $('#TestForm').submit();
       }
  &lt;/script&gt;
  
  
  &lt;form id="TestForm" name="TestForm" action="" method="post" target="_blank"&gt;
       &lt;ui:repeat value="#{vendorCatalogView.punchOutCatalog.urlParameters}" var="parameter"&gt;
           &lt;input type="hidden" name="#{parameter.name}" value = "#{parameter.value}"/&gt;
       &lt;/ui:repeat&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have also tried:</p>
  
  <ol>
  <li>$('form#TestForm').submit()</li>
  <li>putting stuff in the submit so submit(function(event){...}); that one made it not work in any browser</li>
  <li>document.getElementById("TestForm).submit();</li>
  </ol>
  
  <p>im using JSF and primefaces.</p>
  
  <p>UPDATE:!!!
  So i noticed in the chrome inspect element tool this error:</p>
  
  <p>net::ERR_INSECURE_RESPONSE I looked it up and it seems to deal with ssl certificates?  but the problem is the site is a punch out catalog search that will have lots of links to external catalogs using post.  So I can't just add the ssl certs manually nor would we want our customers to have to do this.  Any work arounds?</p>