Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/22/2016 in all areas

  1. 2 points
    kRv

    Reload Main Page

    Hello Farnsbarnes, Can you tell me please, do you use different domains for parent page, and for iframe? If yes, proposed solution cannot works due to security restrictions. Can you please open browser console, and look for some run-time errors, when you submit form in iframe? Can you see some error with similar text? "SecurityError: Blocked a frame with origin..." If you have similar error, you can use some different technique based on messages. Please pay your attention that it will works in modern browsers only. You can see list of supported browsers here http://caniuse.com/#search=postMessage Add code below to header on your parent page: window.onmessage = function (e) { if (e.data === "refresh") { location.reload(); } }; Add code below to footer in your DataPage, which will open via iframe. <script type="text/javascript"> document.getElementById("caspioform").onsubmit = function () { if (window.parent && window.parent.postMessage) { window.parent.postMessage("refresh", "http://bridge.caspio.net"); //put your own domain here } } </script> Thanks
×
×
  • Create New...