title: how to open a popup window from iframe
body: <p>I am trying to display a popup window from an iframe i have two jsp files
  main.jsp</p>
  
  <pre><code>&lt;form name="searchform"&gt;
          Search for :&lt;input type="text" id="search"/&gt;                
  &lt;/form&gt;
  &lt;iframe name="popup" src="popup.jsp" height="0" width="0" &gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>and another file popup.jsp</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;script src="../js/jquery-1.2.6.js"&gt;&lt;/script&gt;
      &lt;link href="..css/styles.css" rel="stylesheet" type="text/css"&gt;
      &lt;/style&gt;
      &lt;script&gt;
  
              $('#search',window.parent.document).keyup(function(){
                  var text =$(this).val();
                  if(text=="shine"){
                      alert("popup");                 
  
                  }
              });     
  
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="popupDiv" class="popupDiv"&gt;            
              &lt;table  border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
                  &lt;tr style="background-color: #F72C1B" class="orange1"&gt;
                      &lt;td border="0" height="5%" width="30%"&gt; 
                          &amp;nbsp;Choose Options:&lt;/td&gt;                  
                      &lt;td border="0" height="5%" width="30%" align="right"&gt;
                          &lt;a href="javascript:hideDIV()" style="text-decoration: none"&gt;
                           X &lt;/a&gt; &amp;nbsp;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;table align="center"&gt;
                          &lt;tr&gt;
                              &lt;td align="center"&gt;popupdata&lt;/td&gt;
                          &lt;/tr&gt;
      &lt;tr&gt;
                          &lt;td&gt;&lt;input type="button" value="Submit" class="orange1" onclick="selectedBoxes();"&gt;&lt;/td&gt;
                          &lt;/tr&gt;   
                      &lt;/table&gt;                    
                  &lt;/tr&gt;               
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>how to show a popup window instead of the alert msg from iframe without modifying main.jsp.</p>
  
  <pre><code>Any ideas?
  </code></pre>