title: Refresh div on parent page from iframe using jquery
body: <p>I'm using fancybox's modal box with an iFrame. On form success from the iFrame I'm using the code below:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  window.setTimeout('window.top.location.href = "/page.asp"; ',999);
  &lt;/script&gt;
  
  &lt;script language="javascript"&gt;
  &lt;!--
  setTimeout("parent.$.fancybox.close();",1000)
  //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>This closes fancybox's modal box and refreshes the parent page. I want to target a div to refresh on the parent page from the iFrame using Jquery.</p>
  
  <p>I want the target DIV on the parent page with the id="target" to refresh, NOT the entire page. How do I go about it using JQuery?</p>
  
  <p>TIA</p>
  
  <p>Code Example below</p>
  
  <p>Parent Page</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="target"&gt;
  content content
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>iFrame Page Upon Form Validation</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;script type="text/javascript"&gt;
  window.setTimeout('window.top.location.href = "/parent_page.asp"; ',999);
  &lt;/script&gt;
  
  &lt;script language="javascript"&gt;
  &lt;!--
  setTimeout("parent.$.fancybox.close();",1000)
  //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>How do I make a function on the parent page to refresh the div id="target" and call it from the iFrame. Right now, the entire parent page refreshes.</p>