title: Iframe form submit data to Window URL
body: <p>Suppose I type a URL in browser (http://localhost:8080/Proj/page) and I get a page where I have menu and an iframe. on click of menu I am doing an ajax request to the server by posting some data and getting an HTML document as response.
  I am manually updating the HTML document into iframe using javascript. {Reason behind this the URL has a query parameter and I want to POST it to the server and not GET,thus I am not changing iframe src}</p>
  
  <p>Ex:</p>
  
  <pre><code>&lt;a href="#" onClick="frameopen('helloWOrld.html?a=bc&amp;d=ef')"&gt;menu&lt;/a&gt;;
  function frameopen(url) {
      var dataToSend = getQueryParameterFrmUrl(url);//got data in form of Object
      var urlWithoutQUeryParam = getUrlWithoutQueryParam(url);//got url without query parameter
      positionThrobber("section16_contentframe");//add the throbber
      //perform POST using ajax
      $.ajax({
          url: urlWithoutQUeryParam,
          data: dataToSend,
          type: 'POST',
          success: function (serverResponse) {
              //server response came write this to iframe
              removeThrobber();
              var ifrm = document.getElementById('contentframe');
              ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
              ifrm.document.open();
              ifrm.document.write(serverResponse);//server response written
              ifrm.document.close();
          },
          error: function (jqXHR, textStatus, errorThrown) {
              removeThrobber();
              alert("Ajax Request Failed!Text Status:" + textStatus + ",errorThrown:" + errorThrown);
          }
  
      });
  
  }
  </code></pre>
  
  <p>Now the iframe is populated from server response and it contains a form.</p>
  
  <pre><code>&lt;iframe src=""&gt;
  &lt;html&gt;&lt;body&gt;
  &lt;form name="inboxSearchForm" id="inboxSearchForm" commandName="userQueueFilter" action="${pageContext.request.contextPath}/inbox/search" method="post"&gt;
  &lt;a href="#" id="nextPage" onclick="pageJump(document.getElementById('pageNum').value,'up') "&gt;Next &gt;&lt;/a&gt;
  &lt;/form&gt;
  &lt;/body&gt;&lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>There is a link(called Next) inside iframe which  submit form using javascript</p>
  
  <pre><code>document.getElementById('inboxSearchForm').submit();
  </code></pre>
  
  <p>THE problem is when I click on link Next..the iframe is loaded with URL content <code>(http://localhost:8080/Proj/page</code> ie iframe now store entire page ie menu and iframe and it is recursive..can anyone tell me what could be the reason..
  I want iframe to be refreshed from URL <code>/inbox/search</code> and not from the URL in the browser..This behaviours is not getting reflected in IE facing issue in mozilla :(</p>