aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/grum_plugins_classes-2/ajax.js
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-24 21:31:12 +0000
committerplegall <plg@piwigo.org>2010-03-24 21:31:12 +0000
commit31f14fd486a689d83a3712dab8ae2151de57bbc4 (patch)
treedde9d52dde4b4cfe95a7d0c2bd544bd6595e6739 /plugins/grum_plugins_classes-2/ajax.js
parentc639ad1e7e3ec747cac37e230fd8380da98c508b (diff)
Just like for branch 2.0, AMenuManager and grum_plugins_classes-2 are removed.
These plugins exist in piwigo.org/ext and in piwigo.org/svn/extensions git-svn-id: http://piwigo.org/svn/trunk@5321 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/grum_plugins_classes-2/ajax.js')
-rwxr-xr-xplugins/grum_plugins_classes-2/ajax.js104
1 files changed, 0 insertions, 104 deletions
diff --git a/plugins/grum_plugins_classes-2/ajax.js b/plugins/grum_plugins_classes-2/ajax.js
deleted file mode 100755
index 1b8008191..000000000
--- a/plugins/grum_plugins_classes-2/ajax.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -----------------------------------------------------------------------------
- file: ajax.js
- file version: 1.1.0
- date: 2008-05-25
- ------------------------------------------------------------------------------
- author: grum at grum.dnsalias.com
- << May the Little SpaceFrog be with you >>
- ------------------------------------------------------------------------------
-
- this classes provides base functions to add ajax into html page
-
- + create_httpobject provide a simple function to create an HTML request to a
- server ; return an XMLHttpRequest object (or compatible object for IE)
-
- + tHttpObject is a class providing :
- - an XMLHttpRequest object
- -
-
- ------------------------------------------------------------------------------
- HISTORY VERSION
- v1.0.1 + [create_httpobject] overrideMimeType unknown by IE 7.0 ;
- v1.1.0 + add create_httpobject2 with mimetype parameter
-
- -------------------------------------------------------------------------- */
-
-
- function create_httpobject(requesttype, charset, ajaxurl, async)
- {
- return(create_httpobject2(requesttype, charset, ajaxurl, async, ''));
- }
-
- function create_httpobject2(requesttype, charset, ajaxurl, async, mimetype)
- {
- if (window.XMLHttpRequest)
- {
- // IE7 & FF method
- http_request = new XMLHttpRequest();
- }
- else
- {
- //Other IE method.....
- if (window.ActiveXObject)
- {
- try
- {
- http_request = new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch (e)
- {
- try
- {
- http_request = new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (e)
- {
- window.alert("Your browser is unable to use XMLHTTPRequest");
- } // try-catch
- } // try-catch
- }
- } // if-else
-
- if(charset=='') { charset='utf-8'; }
-
- http_request.onreadystatechange = function() { };
- http_request.open(requesttype.toUpperCase(), ajaxurl, async);
-
- if(mimetype=='')
- {
- mimetype='text/html';
- }
-
- try
- {
- http_request.overrideMimeType(mimetype+'; charset='+charset);
- }
- catch(e)
- {
- }
-
- if(requesttype.toUpperCase()=='POST')
- {
- http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- }
-
- //method to restitute an XML object ; needed for compatibility between FF&IE
- http_request.XML = httpobject_responseXML;
-
- return(http_request);
- }
-
-
- function httpobject_responseXML()
- {
- if (document.implementation && document.implementation.createDocument)
- {
- //ff method
- return(this.responseXML);
- }
- else
- {
- //ie method
- return(xmlCreateFromString(this.responseText));
- }
- } \ No newline at end of file