Note that there are some explanatory texts on larger screens.

plurals
  1. POAJAX post from within iFrame to refresh parent page
    primarykey
    data
    text
    <p>I have a JS function that is called in an iFrame that performs a post to my server and THEN is suppose to refresh the parent page of the iFrame. When I click a button on a third party site, a hidden div is rendered with my iframe. Once I make a submit post, I want to refresh the page (3rd party) page.</p> <p>So the current setup for that website (which is third party and I have no control over their code), is this:</p> <ul> <li>Body</li> <li>div</li> <li>div</li> <li>div</li> <li>table</li> <li>tr</li> <li>my iframe</li> <li>....</li> </ul> <p>So the code that is attached to my jQuery ajax POST call is such:</p> <pre><code> ..... xhtml.append("}).done(function() { alert('im here'); window.location.reload(false);});"); xhtml.append("}"); ..... </code></pre> <p>I'd prefer not showing all the code - but I can confirm that the done callback from the post IS called correctly AND the page does appear to "refresh" - but it should be treating it almost like I first entered the page, with my iframe closed.</p> <p>How do I get almost a fresh reload of the page/css/etc? I figured this would work, but it appears it doesn't.</p> <p><strong>--Edit--</strong></p> <p>I realized that adding reload(true) will reload the server on initial request. However, the other content that renders (to view the hidden div) doesn't appear to reload correctly. It leaves the hidden divs up.</p> <p><strong>--Edit 2--</strong></p> <p>It looks like that window.location.reload(false); isn't a true "replica" of a browser refresh call. Which is ideally what I'm looking for.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload