On Fri, Mar 14, 2008 at 6:42 PM, Kevin Brown <[EMAIL PROTECTED]> wrote:

>
> All cross domain calls are blocked (in all browsers I'm aware of) between
> your local file system and a web server -- that means that rpc will only
> work when both the page you're viewing and the server rendering the gadget
> are served from web servers.
>

Okay - but...

As long as you always access both the parent page and the iframe page from a
> web server it'll work.
>

I've found that FF version 2.0.0.12 on Windows XP does not.  I tried
tracking it down in Firebug to no avail.  I have successfully tested
FF 3.0bon Windows XP and it works perfectly.

Test case - run this on any other server other than localhost:8080

<!DOCTYPE html>
<html>
<head>
<title>Sample: Dynamic Height - fails on FF 2.0.0.12</title>
<link rel="stylesheet" href="
http://localhost:8080/gadgets/files/container/gadgets.css";>
<script type="text/javascript" src="
http://localhost:8080/gadgets/js/rpc.js?c=1&debug=1";></script>
<script type="text/javascript" src="
http://localhost:8080/gadgets/files/container/cookies.js";></script>
<script type="text/javascript" src="
http://localhost:8080/gadgets/files/container/gadgets.js";></script>
<script type="text/javascript">
var my = {};

my.gadgetSpecUrls = [
  'http://www.google.com/ig/modules/aue07otr.xml?debug=1'
];

my.LayoutManager = function() {
  gadgets.LayoutManager.call(this);
};

my.LayoutManager.inherits(gadgets.LayoutManager);

my.LayoutManager.prototype.getGadgetChrome = function(gadget) {
  var chromeId = 'gadget-chrome-' + gadget.id;
  return chromeId ? document.getElementById(chromeId) : null;
};

my.init = function() {
  gadgets.container.layoutManager = new my.LayoutManager();
  
gadgets.container.setParentUrl('http://localhost:8080'<http://localhost:8080%27>
);
};

my.renderGadgets = function() {
  for (var i = 0; i < my.gadgetSpecUrls.length; ++i) {
    var gadget = gadgets.container.createGadget(
        {specUrl: my.gadgetSpecUrls[i]});
    
gadget.setServerBase('http://localhost:8080/gadgets/'<http://localhost:8080/gadgets/%27>
);

    gadgets.container.addGadget(gadget);
    gadgets.container.renderGadget(gadget);
  }
};
</script>
</head>
<body onLoad="my.init();my.renderGadgets()">
  <h2>Sample: Dynamic Height</h2>
  <div id="gadget-chrome-0" class="gadgets-gadget-chrome"></div>
</body>
</html>

Regards
Martin
-- 
Internet Related Technologies - http://www.irt.org

Reply via email to