/[drupal]/contributions/modules/weight/httpRequest.js
ViewVC logotype

Contents of /contributions/modules/weight/httpRequest.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Jul 12 04:34:13 2006 UTC (3 years, 4 months ago) by hlslaughter
Branch: MAIN
CVS Tags: DRUPAL-4-7--1-1, DRUPAL-6--1-0, DRUPAL-5--1-1-RC1, DRUPAL-4-7--1-2, DRUPAL-6--1-0-BETA3, DRUPAL-6--1-0-BETA2, DRUPAL-6--1-0-BETA1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5, DRUPAL-4-7, DRUPAL-6--1
File MIME type: text/javascript
Added bulk weight management page in admin/node
1 /*
2 Code borrowed from: http://safari.oreilly.com/0596101694
3
4 Wrapper function for constructing a request object.
5 Parameters:
6 reqType: The HTTP request type, such as GET or POST.
7 url: The URL of the server program.
8 asynch: Whether to send the request asynchronously or not.
9 */
10
11
12 function httpRequest(reqType,url,asynch){
13 //Mozilla-based browsers
14 if(window.XMLHttpRequest){
15 request = new XMLHttpRequest( );
16 } else if (window.ActiveXObject){
17 request=new ActiveXObject("Msxml2.XMLHTTP");
18 if (! request){
19 request=new ActiveXObject("Microsoft.XMLHTTP");
20 }
21 }
22 //the request could still be null if neither ActiveXObject
23 //initialization succeeded
24 if(request){
25 initReq(reqType,url,asynch);
26 } else {
27 alert("Your browser does not permit the use of all "+
28 "of this application's features!");
29 }
30 }
31 /* Initialize a request object that is already constructed */
32 function initReq(reqType,url,bool){
33 /* Specify the function that will handle the HTTP response */
34 request.onreadystatechange=null;
35 request.open(reqType,url,bool);
36 request.send(null);
37 }
38

  ViewVC Help
Powered by ViewVC 1.1.2