title: spring mvc jquery modal boxes and iframe
body: <p>I am trying to integrate Spring MVC + jquery + modal in a application where the modal is an iframe.</p>
  
  <p>The jquery plugin is <a href="http://www.ericmmartin.com/projects/simplemodal/" rel="nofollow">SimpleModal</a>.</p>
  
  <p>The screen is pretty simple.  The landing page is a production page which has 2 products in which the prices are based on a zip code.</p>
  
  <p>When the page load it runs the following:</p>
  
  <pre><code>$(window).load(function(){
      var param = $.url().param('zipcode');
      alert("zipcode = " + param);
      if(null == param || param.length == 0)
      {
        $.modal('&lt;iframe src="zip-code.html" height="240" width="380" scrolling="no"&gt;', {
          //overlayClose:false,
          //closeHTML:""
          //onClose: contact.close
          });
      }
  
    });
  </code></pre>
  
  <p>The zip code box is displayed and the user simple enters in the zip code and selects Applied.  </p>
  
  <p>The zip code has to be checked to see if it is valid and belongs to a given region.  If errors, then the zip code box is displayed, otherwise the zip code is accepted and the window is suppose to close and the landing page is to be refreshed with the prices.</p>
  
  <p>Now I created a simple controller for both the landing page and the zip code modal window.  The zip code modal makes use of the same controller as the landing page.</p>
  
  <p>What is happening is that when the user selects the apply button and the zip code is valid, instead of the modal window closing, it is getting redirected to the landing page url.</p>
  
  <p>I am new to jQuery.  I have search the web to see if others are using spring mvc with modals or popup windows and I have been unsuccessful in that search.</p>