5 messages in com.googlegroups.opensocial-apiRe: [OpenSocial] Re: IE6 and IE7
FromSent OnAttachments
Luciano Ricardi15 May 2008 05:36 
justin kruger15 May 2008 05:38 
Luciano Ricardi15 May 2008 06:39 
Luciano Ricardi15 May 2008 18:41 
justin kruger15 May 2008 19:03 
Subject:Re: [OpenSocial] Re: IE6 and IE7
From:Luciano Ricardi (rica@gmail.com)
Date:05/15/2008 06:39:17 AM
List:com.googlegroups.opensocial-api

No...

It's related to some Javascript calls... This calls work fine on Firefox... some calls works on IE6 and a lot not works on IE7... For example... A call to a javascript function that only detect if the VIEWER is the owner and then make a request to our server and apply the custom layout to the gadget...

function DefOwner() { var req2 = opensocial.newDataRequest(); req2.add(req2.newFetchPersonRequest('VIEWER'), 'viewer'); req2.send(f_is_owner); }

function f_is_owner(data) { var viewer2 = data.get("viewer").getData(); if(viewer2.isOwner()) { url = "http://200.200.200.200/canvas_owner.php"; } else { url = "http://200.200.200.200/canvas_viewer.php"; }

function makeRequest() { var params = {}; params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(url, response, params, 10); };

function response(obj) { var str = obj.text; var html = str; document.getElementById('main').innerHTML = html; };

function makeCachedRequest(url, callback, params, refreshInterval) { var ts = new Date().getTime(); var sep = "?"; if (refreshInterval && refreshInterval > 0) { ts = Math.floor(ts / (refreshInterval * 1000)); } if (url.indexOf("?") > -1) { sep = "&"; } url = [ url, sep, "nocache=", ts ].join(""); gadgets.io.makeRequest(url, response, params); };

makeRequest(); };

When calling this function using "onClick" event handler on a link for example.. or even calling through an href="javascript:DefOwner();" IE6 and IE7 show errors and don't renderize the gadget properly...

On Thu, May 15, 2008 at 9:38 AM, justin kruger <just@gmail.com> wrote:

is it related to doc type?

On Thu, May 15, 2008 at 7:36 AM, Luciano Ricardi <rica@gmail.com> wrote:

Hi all,

We are developing some complex gadgets that interacts with our external servers and, we are having a lot of problems when using IE6 and IE7. On Firefox, for example, that works fine.

The errors are on javascript generated by OpenSocial Container, and there are so many...

Is someone experiencing the same problem?

Thanks,

"If you are successful, it is because somewhere, sometime, someone gave you a life or an idea that started you in the right direction. Remember also that you are indebted to life until you help some less fortunate person, just as you were helped." --Melinda Gates