Hi,

I have a question concerning my gadget when I use IE7:

My gadget defines some "User Pref" values and is using Content
type="url". The called page uses window.location.href to get it's url.
>From this url I read out the pref values [4] to use them in my
visualisation.
This works fine as long as I'm using Firefox. I can create a
GoogleSpreadsheet and insert my gadget or call it directly by calling
it with a correct URL (pref values and query url set properly).

BUT when I'm using IE 7 it only works when calling it in the browser
[1] (if I'm properly logged in at Google Docs). When I insert a gadget
in Google Spreadsheets the query times out.

When I started to look why this is happening i found out that
"window.location.href" (located on my called page [3]) only returns
the called url without the string after # [2]. So basically none of
the pref values are handed to my page. It seems to simply cut them off
(this isn't the case if I'm using Firefox). When i right click on the
gadget I inserted in Google Spreadsheets (it stays blank) and click
properties it shows the correct url (the one that should be
called...).

I don't know why this is happening (and only in IE7). Am I doing
something wrong?

Regards,
Martin


[1] example for calling it directly in the browser using an url (works
fine at FF and IE):
http://.../linechart.html?up__table_query_url=z&up_color_scheme=z&lang=en&country=us&.lang=en&.country=us&synd=spreadsheets&mid=37&ifpctok=-2154661959840801671&parent=http://spreadsheets.google.com&libs=y16dCoX9jVE/lib/libcore.js#up__table_query_url=http%3A%2F%2Fspreadsheets.google.com%2Ftq%3Fkey%3DpparpXe6S9r91f01rz2zdAA%26range%3DA1%3AB15%26gid%3D0%26headers%3D-1&up_color_scheme=Different&idi_hr=http%3A%2F%2Fspreadsheets.google.com%2Fig%2Fidi_relay.txt

[2] value of "window.location.href" in IE7 using Google Spreadsheets:
http://.../linechart.html?up__table_query_url=z&up_color_scheme=z&lang=en&country=us&.lang=en&.country=us&synd=spreadsheets&mid=37&ifpctok=-2154661959840801671&parent=http://spreadsheets.google.com&libs=y16dCoX9jVE/lib/libcore.js

[3] called page:
<html>
  <head>
    <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
    <script type="text/javascript" src="ig.js"></script>
    <script type="text/javascript">

       alert(window.location.href);

        var libs = gup('libs');
        var prefs = new _IG_Prefs(libs);
        google.load("visualization","1");
        google.setOnLoadCallback(initialize);
..............

[4] obtained from "http://www.netlobo.com/
url_query_string_javascript.html"
function gup( name ) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to