0

I want to provide a gadget type calculator plugin service to my client websites. This will add a button that will popup a calculator from my own website and its calculated result will be posted to my corresponding client's website.

I am using code from here: http://www.aspsnippets.com/Articles/Pass-value-from-child-popup-window-to-parent-page-window-using-JavaScript.aspx to post the selected content of popup window to its opener window. Its working great in IE but due to security issues Google Chrome is showing error:

Uncaught SecurityError: Blocked a frame with origin "--my website's domain--" from accessing a frame with origin "--my client website's domain--". Protocols, domains, and ports must match.

I know why this error is coming, but is there any way to avoid this?

Shiva Pareek
  • 1,719
  • 5
  • 21
  • 42
  • You can use jsonp http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about – Mr.Cocococo Jun 23 '14 at 14:03
  • Between frames or popups you should use the [`postMessage` api](https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage) – Bergi Jun 23 '14 at 14:07

0 Answers0