I am trying to incorporate the google payment service in a website
which is using framesets. I get warnings/errors when trying to
initialize:
"No relay set (used as window.postMessage targetOrigin), cannot send
cross-domain message"
Has anyone had experience with this?
I've tried to have a look at the google API code which is pulled in
but, oh boy, it is somewhat "obfuscated" for my eyes (maybe I'm
getting old, hehe) I can imagine that "window" should be changed to
"f_pres.window" at some places(?) but the google.load call doesn't
seem to have parameters for this.
I am grateful for all the help I can get..
/Robert
About the frameset solution:
A tiny testcase:
http://hem.bredband.net/robertkr/i.htm
i.htm:
<html>
<frameset onload="" cols="100%,0" frameborder=no framespacing=0
border=0>
<frame name="f_pres" src="p.htm">
<frame name="f_ms" scrolling="no" noresize>
</frameset>
</html>
p.htm:
<html><head>
<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script>
google.load('payments', '1.0', {'packages': ['sandbox_config']});
//No relay set (used as window.postMessage targetOrigin), cannot send
cross-domain message
</script>
</head><body></body></html>
Since you are calling the JS API loader from an iframe, rather than
from your window, you are getting the cross domain error.
Please load the script in the page you intend to use it on. Is there
any particular reason you need nested frames to place a payment
button?
Regards,