IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

[AJAX] le scripte google visualization


Sujet :

JavaScript

  1. #1
    Futur Membre du Club
    Inscrit en
    Février 2009
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Février 2009
    Messages : 4
    Points : 5
    Points
    5
    Par défaut [AJAX] le scripte google visualization
    Bonjour a tous,

    voila je développe une application web en AJAX, j'utilise google visualization api, mais j'arrive pas à retrouver la source du scripte de l'api
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    pour etre indépendant d'internet et travailler localement.

    si qlq peux m'aider je serai très reconnaissant. merci!

  2. #2
    Expert confirmé
    Avatar de RomainVALERI
    Homme Profil pro
    POOête
    Inscrit en
    Avril 2008
    Messages
    2 652
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : POOête

    Informations forums :
    Inscription : Avril 2008
    Messages : 2 652
    Points : 4 164
    Points
    4 164
    Par défaut
    Tu peux l'obtenir en entrant dans la barre d'adresse de ton navigateur l'URL présente dans la prorpiété src de ton élément <script>

    (ce qui affiche le code suivant)(tel quel... attention les yeux c'est du brutal )
    Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    if (!window['google']) {
    window['google'] = {};
    }
    if (!window['google']['loader']) {
    window['google']['loader'] = {};
    google.loader.ServiceBase = 'http://www.google.com/uds';
    google.loader.GoogleApisBase = 'http://ajax.googleapis.com/ajax';
    google.loader.ApiKey = 'notsupplied';
    google.loader.KeyVerified = true;
    google.loader.LoadFailure = false;
    google.loader.Secure = false;
    google.loader.ClientLocation = null;
    google.loader.AdditionalParams = '';
    (function() {var e=false,g=null,h=true,i=encodeURIComponent,j=window,k=google,l=undefined,m=document;function o(b,a){return b.load=a}var p="push",q="length",t="prototype",u="setTimeout",v="replace",w="charAt",x="loader",y="substring",z="ServiceBase",B="toLowerCase";function C(b){if(b in D)return D[b];return D[b]=navigator.userAgent[B]().indexOf(b)!=-1}var D={};function E(){return C("safari")||C("konqueror")}function F(b,a){var c=function(){};c.prototype=a[t];b.N=a[t];b.prototype=new c}
    function G(b,a){var c=b.B||[];c=c.concat(Array[t].slice.call(arguments,2));if(typeof b.q!="undefined")a=b.q;if(typeof b.p!="undefined")b=b.p;var d=function(){var f=c.concat(Array[t].slice.call(arguments));return b.apply(a,f)};d.B=c;d.q=a;d.p=b;return d}function H(b){var a=new Error(b);a.toString=function(){return this.message};return a}function I(b,a){var c=b.split(/\./),d=j,f=0;for(;f<c[q]-1;f++){d[c[f]]||(d[c[f]]={});d=d[c[f]]}d[c[c[q]-1]]=a}function J(b,a,c){b[a]=c}var aa=aa||{};if(!K)var K=I;
    if(!ba)var ba=J;k[x].r={};K("google.loader.callbacks",k[x].r);var L={},M={};k[x].eval={};K("google.loader.eval",k[x].eval);o(k,function(b,a,c){var d=L[":"+b];if(d){if(c&&!c.language&&c.locale)c.language=c.locale;var f=c&&c.callback!=g;if(f&&!d.o())throw H("Module: '"+b+"' must be loaded before DOM onLoad!");else if(f)d.k(a,c)?j[u](c.callback,0):d.load(a,c);else d.k(a,c)||d.load(a,c)}else throw H("Module: '"+b+"' not found!");});K("google.load",k.load);k.I=function(b,a){a?ca(b):N(j,"load",b)};
    K("google.setOnLoadCallback",k.I);function N(b,a,c){if(b.addEventListener)b.addEventListener(a,c,e);else if(b.attachEvent)b.attachEvent("on"+a,c);else{var d=b["on"+a];b["on"+a]=d!=g?da([c,d]):c}}function da(b){return function(){var a=0;for(;a<b[q];a++)b[a]()}}var P=[];function ca(b){if(P[q]==0){N(j,"load",Q);if(!C("msie")&&!E()&&C("mozilla")||j.M)j.addEventListener("DOMContentLoaded",Q,e);else if(C("msie")){j[u](R,10);m.attachEvent("onreadystatechange",S)}else E()&&j[u](T,10)}P[p](b)}
    function R(){try{P[q]>0&&m.documentElement.doScroll("left")}catch(b){j[u](R,10);return}Q()}var ea={loaded:h,complete:h};function S(){if(ea[m.readyState]){m.detachEvent("onreadystatechange",S);Q()}}function T(){if(ea[m.readyState])Q();else P[q]>0&&j[u](T,10)}function Q(){var b=0;for(;b<P[q];b++)P[b]();P.length=0}
    k[x].d=function(b,a,c){if(c){var d;if(b=="script"){d=m.createElement("script");d.type="text/javascript";d.src=a}else if(b=="css"){d=m.createElement("link");d.type="text/css";d.href=a;d.rel="stylesheet"}var f=m.getElementsByTagName("head")[0];f||(f=m.body.parentNode.appendChild(m.createElement("head")));f.appendChild(d)}else if(b=="script")m.write('<script src="'+a+'" type="text/javascript"><\/script>');else b=="css"&&m.write('<link href="'+a+'" type="text/css" rel="stylesheet"></link>')};
    K("google.loader.writeLoadTag",k[x].d);k[x].G=function(b){M=b};K("google.loader.rfm",k[x].G);k[x].H=function(b){for(var a in b)if(typeof a=="string"&&a&&a[w](0)==":"&&!L[a])L[a]=new U(a[y](1),b[a])};K("google.loader.rpl",k[x].H);k[x].loaded=function(b){L[":"+b.module].i(b)};K("google.loader.loaded",k[x].loaded);I("google_exportSymbol",I);I("google_exportProperty",J);function V(b){this.a=b;this.m={};this.b={};this.j=h;this.c=-1}
    V[t].f=function(b,a){var c="";if(a!=l){if(a.language!=l)c+="&hl="+i(a.language);if(a.nocss!=l)c+="&output="+i("nocss="+a.nocss);if(a.nooldnames!=l)c+="&nooldnames="+i(a.nooldnames);if(a.packages!=l)c+="&packages="+i(a.packages);if(a.callback!=g)c+="&async=2";if(a.other_params!=l)c+="&"+a.other_params}if(!this.j){if(k[this.a]&&k[this.a].JSHash)c+="&sig="+i(k[this.a].JSHash);var d=[];for(var f in this.m)f[w](0)==":"&&d[p](f[y](1));for(var f in this.b)f[w](0)==":"&&d[p](f[y](1));c+="&have="+i(d.join(","))}return k[x][z]+
    "/?file="+this.a+"&v="+b+k[x].AdditionalParams+c};V[t].t=function(b){var a=g;if(b)a=b.packages;var c=g;if(a)if(typeof a=="string")c=[b.packages];else if(a[q]){c=[];var d=0;for(;d<a[q];d++)typeof a[d]=="string"&&c[p](a[d][v](/^\s*|\s*$/,"")[B]())}c||(c=["default"]);var f=[],d=0;for(;d<c[q];d++)this.m[":"+c[d]]||f[p](c[d]);return f};
    o(V[t],function(b,a){var c=this.t(a),d=a&&a.callback!=g;if(d)var f=new W(a.callback);var r=[],s=c[q]-1;for(;s>=0;s--){var n=c[s];d&&f.C(n);if(this.b[":"+n]){c.splice(s,1);d&&this.b[":"+n][p](f)}else r[p](n)}if(c[q]){if(a&&a.packages)a.packages=c.sort().join(",");if(!a&&M[":"+this.a]!=g&&M[":"+this.a].versions[":"+b]!=g&&!k[x].AdditionalParams&&this.j){var A=M[":"+this.a];k[this.a]=k[this.a]||{};for(var O in A.properties)if(O&&O[w](0)==":")k[this.a][O[y](1)]=A.properties[O];k[x].d("script",k[x][z]+
    A.path+A.js,d);A.css&&k[x].d("css",k[x][z]+A.path+A.css,d)}else k[x].d("script",this.f(b,a),d);if(this.j){this.j=e;this.c=(new Date).getTime();if(this.c%100!=1)this.c=-1}var s=0;for(;s<r[q];s++){var n=r[s];this.b[":"+n]=[];d&&this.b[":"+n][p](f)}}});
    V[t].i=function(b){if(this.c!=-1){X("al_"+this.a,"jl."+((new Date).getTime()-this.c),h);this.c=-1}var a=0;for(;a<b.components[q];a++){this.m[":"+b.components[a]]=h;var c=this.b[":"+b.components[a]];if(c){var d=0;for(;d<c[q];d++)c[d].F(b.components[a]);delete this.b[":"+b.components[a]]}}X("hl",this.a)};V[t].k=function(b,a){return this.t(a)[q]==0};V[t].o=function(){return h};function W(b){this.D=b;this.l={};this.n=0}W[t].C=function(b){this.n++;this.l[":"+b]=h};
    W[t].F=function(b){if(this.l[":"+b]){this.l[":"+b]=e;this.n--;this.n==0&&j[u](this.D,0)}};function Y(b,a,c,d,f,r,s,n){this.a=b;this.z=a;this.K=c;this.v=d;this.A=f;this.J=r;this.w=s||{};this.s=this.g=e;this.h=[];this.u=typeof n=="string"?n:n?a:g;this.L=n;k[x].r[this.a]=G(this.i,this)}F(Y,V);o(Y[t],function(b,a){var c=a&&a.callback!=g;if(c){this.h[p](a.callback);a.callback="google.loader.callbacks."+this.a}else this.g=h;k[x].d("script",this.f(b,a),c)});Y[t].k=function(b,a){return a&&a.callback!=g?this.s:this.g};
    Y[t].i=function(){this.s=h;var b=0;for(;b<this.h[q];b++)j[u](this.h[b],0);this.h=[]};
    Y[t].f=function(b,a){var c="";if(this.v!=g)c+="&"+this.v+"="+i(k[x].ApiKey);if(this.A!=g)c+="&"+this.A+"="+i(b);var d=k[x].Secure,f;if(d&&this.u)f=this.u;else{f=this.z;d=e}if(a!=g)for(var r in a)if(this.w[":"+r]!=g){var s=a[r],n=this.w[":"+r];c+=typeof n=="string"?"&"+n+"="+i(s):"&"+n(s)}else if(r=="other_params")c+="&"+a[r];else if(r=="base_domain"){f=this.z;d=e;f=f[v](/^[^\/]*/,a[r])}k[this.a]={};if(!this.K&&c!="")c="?"+c[y](1);X("el",this.a);return(d?"https":"http")+"://"+f+c};Y[t].o=function(){return this.J};function U(b,a){this.a=b;this.e=a;this.g=e}F(U,V);o(U[t],function(b,a){this.g=h;k[x].d("script",this.f(b,a),e)});U[t].k=function(){return this.g};U[t].i=function(){};U[t].f=function(b,a){if(!this.e.versions[":"+b]){if(this.e.aliases){var c=this.e.aliases[":"+b];if(c)b=c}if(!this.e.versions[":"+b])throw H("Module: '"+this.a+"' with version '"+b+"' not found!");}var d=k[x].GoogleApisBase+"/libs/"+this.a+"/"+b+"/"+this.e.versions[":"+b][a&&a.uncompressed?"uncompressed":"compressed"];X("el",this.a);return d};
    U[t].o=function(){return e};var fa=e,Z=[],ha=function(){if(!fa){N(j,"unload",ga);fa=h}},X=function(b,a,c){ha();if(c){if(!k[x].Secure&&(!k[x].Options||k[x].Options.csi===e)){b=b[B]()[v](/[^a-z0-9_.]+/g,"_");a=a[B]()[v](/[^a-z0-9_.]+/g,"_");var d="http://csi.gstatic.com/csi?s=uds&v=2&action="+i(b)+"&it="+i(a);j[u](G($,g,d),10000)}}else{Z[p]("r"+Z[q]+"="+i(b+(a?"|"+a:"")));j[u](ga,Z[q]>5?0:15000)}},ga=function(){if(Z[q]){$(k[x][z]+"/stats?"+Z.join("&"));Z.length=0}},$=function(b){var a=new Image,c=ia++;ja[c]=a;a.onerror=function(){delete ja[c]};
    a.onload=a.onerror;a.src=b},ja={},ia=0;I("google.loader.recordStat",X);I("google.loader.createImageForLogging",$);L[":search"]=new V("search");L[":feeds"]=new V("feeds");L[":language"]=new V("language");L[":elements"]=new V("elements");L[":ads"]=new V("ads");L[":maps"]=new Y("maps","maps.google.com/maps?file=googleapi",h,"key","v",h,{":language":"hl",":callback":function(b){return"callback="+i(b)+"&async=2"}},"maps-api-ssl.google.com/maps?file=googleapi");L[":gdata"]=new V("gdata");L[":sharing"]=new Y("sharing","www.google.com/s2/sharing/js",e,"key","v",e,{":locale":"hl"});
    L[":annotations"]=new Y("annotations","www.google.com/reviews/scripts/annotations_bootstrap.js",e,"key","v",h,{":language":"hl",":country":"gl",":callback":"callback"});L[":visualization"]=new V("visualization");L[":books"]=new Y("books","books.google.com/books/api.js",e,"key","v",h,{":language":"hl",":callback":"callback"});L[":earth"]=new V("earth");L[":friendconnect"]=new Y("friendconnect","www.google.com/friendconnect/script/friendconnect.js",e,"key","v",e,{});
     
    }) ();google.loader.rfm({":feeds":{"versions":{":1":"1",":1.0":"1"},"path":"/api/feeds/1.0/f62680fcfb1cdeac9f89db8271896b0c/","js":"default+fr.I.js","css":"default.css","properties":{":JSHash":"f62680fcfb1cdeac9f89db8271896b0c",":Version":"1.0"}},":search":{"versions":{":1":"1",":1.0":"1"},"path":"/api/search/1.0/e6972f242a7debaf3b55277ba008fc76/","js":"default+fr.I.js","css":"default.css","properties":{":JSHash":"e6972f242a7debaf3b55277ba008fc76",":NoOldNames":false,":Version":"1.0"}},":language":{"versions":{":1":"1",":1.0":"1"},"path":"/api/language/1.0/7d9dd7fae1f828a33e788458418c8eff/","js":"default+fr.I.js","properties":{":JSHash":"7d9dd7fae1f828a33e788458418c8eff",":Version":"1.0"}},":earth":{"versions":{":1":"1",":1.0":"1"},"path":"/api/earth/1.0/0e824502888b5d9d4abee2f3c3e15f38/","js":"default.I.js","properties":{":JSHash":"0e824502888b5d9d4abee2f3c3e15f38",":Version":"1.0"}},":ads":{"versions":{":1":"1",":1.0":"1"},"path":"/api/ads/1.0/631cc1cf84ad33595cef1f09b9d91415/","js":"default.I.js","properties":{":JSHash":"631cc1cf84ad33595cef1f09b9d91415",":Version":"1.0"}}});
    google.loader.rpl({":scriptaculous":{"versions":{":1.8.2":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.1":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"}},"aliases":{":1.8":"1.8.2",":1":"1.8.2"}},":yui":{"versions":{":2.6.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"}},"aliases":{":2":"2.6.0",":2.6":"2.6.0"}},":swfobject":{"versions":{":2.1":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"}},"aliases":{":2":"2.1"}},":mootools":{"versions":{":1.2.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.11":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"}},"aliases":{":1":"1.11"}},":jqueryui":{"versions":{":1.5.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"}},"aliases":{":1":"1.5.3",":1.5":"1.5.3"}},":prototype":{"versions":{":1.6.0.2":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.3":{"uncompressed":"prototype.js","compressed":"prototype.js"}},"aliases":{":1":"1.6.0.3",":1.6":"1.6.0.3"}},":jquery":{"versions":{":1.2.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.6":{"uncompressed":"jquery.js","compressed":"jquery.min.js"}},"aliases":{":1":"1.3.1",":1.3":"1.3.1",":1.2":"1.2.6"}},":dojo":{"versions":{":1.2.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.1.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"}},"aliases":{":1":"1.2.3",":1.2":"1.2.3",":1.1":"1.1.1"}}});
    }

  3. #3
    Futur Membre du Club
    Inscrit en
    Février 2009
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Février 2009
    Messages : 4
    Points : 5
    Points
    5
    Par défaut google visualisation api
    merci pour ta réponse, mais je reste toujours dépendant d'internet puisque le script fait appel à des URL, je me demande si jamais ya un package contenant le code source que je peux utiliser localement !

  4. #4
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    Le codes de Google ne sont pas open source. Donc non, tu ne peux pas, sinon, c'est du piratage

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Google Maps] Script Google Maps
    Par glopglups dans le forum APIs Google
    Réponses: 1
    Dernier message: 21/11/2007, 16h30
  2. [AJAX] Conflit entre script Ajax et scripts Javascript
    Par Mingain dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 27/10/2007, 13h18
  3. [Web Service][PHP Script] Google API Search
    Par franck.automaticien dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 20/07/2007, 11h25
  4. [AJAX] Adapter script AJAX
    Par Jiraiya42 dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 11/07/2007, 07h08
  5. [AJAX] 2 scripts AJAX (contenu dynamique)
    Par Mith55 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 11/11/2006, 22h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo