[Html_ajax-svn] [293] changing email address

Laurent Yaish laurenty at gmail.com
Fri Dec 2 11:36:19 CST 2005


looks like a bit more than an email change...

On 12/2/05, arpad at bluga.net <arpad at bluga.net> wrote:
>
>  Revision 293 Author arpad Date 2005-12-02 11:14:25 -0600 (Fri, 02 Dec 2005)
> Log Message changing email address
>
> Modified Paths
>
> trunk/AJAX/Serializer/PHP.php
> trunk/AJAX/Serializer/Urlencoded.php
> trunk/docs/authors
> trunk/examples/form.php
> trunk/examples/shoutbox.php
> trunk/examples/tests/js_utils_vardump.php
> trunk/examples/tests/test_priority.php
> trunk/js/HTML_AJAX.js
> trunk/js/HttpClient.js
> trunk/js/serializer/UrlSerializer.js
> trunk/js/serializer/phpSerializer.js
>
> Diff
> Modified: trunk/AJAX/Serializer/PHP.php (292 => 293) ---
> trunk/AJAX/Serializer/PHP.php 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/AJAX/Serializer/PHP.php 2005-12-02 17:14:25 UTC (rev 293)
> @@ -5,7 +5,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
>
>
> Modified: trunk/AJAX/Serializer/Urlencoded.php (292 => 293)
> --- trunk/AJAX/Serializer/Urlencoded.php 2005-12-02
> 17:02:57 UTC (rev 292)
> +++ trunk/AJAX/Serializer/Urlencoded.php 2005-12-02
> 17:14:25 UTC (rev 293)
> @@ -5,7 +5,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
>
>
> Modified: trunk/docs/authors (292 => 293) --- trunk/docs/authors 2005-12-02
> 17:02:57 UTC (rev 292)
> +++ trunk/docs/authors 2005-12-02 17:14:25 UTC (rev 293)
> @@ -2,4 +2,4 @@
>  David Coallier <davidc at php.net> - Project Lead
>  Laurent Yaish <laurenty at gmail.com> - Developer
>  Elizabeth Smith <auroraeosrose at gmail.com> - Developer
> -Arpad Ray <arpad at rajeczy.com> - Developer
> +Arpad Ray <arpad at php.net> - Developer
>
>
> Modified: trunk/examples/form.php (292 => 293) --- trunk/examples/form.php
> 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/examples/form.php 2005-12-02 17:14:25 UTC (rev 293)
> @@ -4,7 +4,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
>
>
> Modified: trunk/examples/shoutbox.php (292 => 293) ---
> trunk/examples/shoutbox.php 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/examples/shoutbox.php 2005-12-02 17:14:25 UTC (rev 293)
> @@ -4,7 +4,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
> @@ -29,8 +29,9 @@
>  fclose($h);
>  }
>  }
> + var_dump($_GET, $_POST);
> +if (!empty($_POST)) {
>
> -if (!empty($_POST)) {
>  if (!empty($_POST['name']) && !empty($_POST['message'])) {
>  $messages[] = array(
>  htmlspecialchars(strip_tags(substr($_POST['name'], 0,
> 10))),
>
>
> Modified: trunk/examples/tests/js_utils_vardump.php (292 =>
> 293) --- trunk/examples/tests/js_utils_vardump.php
> 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/examples/tests/js_utils_vardump.php 2005-12-02
> 17:14:25 UTC (rev 293)
> @@ -4,7 +4,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
>
>
> Modified: trunk/examples/tests/test_priority.php (292 =>
> 293) --- trunk/examples/tests/test_priority.php 2005-12-02
> 17:02:57 UTC (rev 292)
> +++ trunk/examples/tests/test_priority.php 2005-12-02
> 17:14:25 UTC (rev 293)
> @@ -6,7 +6,7 @@
>  *
>  * @category HTML
>  * @package AJAX
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @copyright 2005 Arpad Ray
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  * @version Release: @package_version@
>
>
> Modified: trunk/js/HTML_AJAX.js (292 => 293) --- trunk/js/HTML_AJAX.js
> 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/js/HTML_AJAX.js 2005-12-02 17:14:25 UTC (rev 293)
> @@ -20,14 +20,139 @@
>  * @category HTML
>  * @package Ajax
>  * @author Joshua Eichorn <josh at bluga.net>
> - * @author Arpad Ray <arpad at rajeczy.com>
> + * @author Arpad Ray <arpad at php.net>
>  * @author David Coallier <davidc at php.net>
>  * @author Elizabeth Smith <auroraeosrose at gmail.com>
>  * @copyright 2005 Joshua Eichorn, Arpad Ray, David Coallier, Elizabeth
> Smith
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  */
>
> +/**
> + * Functions for compatibility with older browsers
> + */
> +if (typeof String.fromCharCode != 'function') {
> + String.prototype.fromCharCode = function(code)
> + {
> + var h = code.toString(16);
> + if (h.length == 1) {
> + h = '0' + h;
> + }
> + return unescape('%' + h);
> + }
> +}
> +if (typeof String.charCodeAt != 'function') {
> + String.prototype.charCodeAt = function(str)
> + {
> + for (i = 1, h; i < 256; i++) {
> + if (String.fromCharCode(i) == str.charAt(i)) {
> + return i;
> + }
> + }
> + }
> +}
> +// http://www.crockford.com/javascript/remedial.html
> +if (typeof Function.apply != 'function') {
> + Function.method('apply', function (o, a) {
> + var r, x = '____apply';
> + if (!((a && typeof a == 'object') || typeof a == 'function')) {
> + o = {};
> + }
> + o[x] = this;
> + switch ((a && a.length) || 0) {
> + case 0:
> + r = o[x]();
> + break;
> + case 1:
> + r = o[x](a[0]);
> + break;
> + case 2:
> + r = o[x](a[0], a[1]);
> + break;
> + case 3:
> + r = o[x](a[0], a[1], a[2]);
> + break;
> + case 4:
> + r = o[x](a[0], a[1], a[2], a[3]);
> + break;
> + case 5:
> + r = o[x](a[0], a[1], a[2], a[3], a[4]);
> + break;
> + case 6:
> + r = o[x](a[0], a[1], a[2], a[3], a[4], a[5]);
> + break;
> + default:
> + alert('Too many arguments to apply.');
> + }
> + delete o[x];
> + return r;
> + });
> +}
> +if (typeof Array.splice != 'function') {
> + Array.prototype.splice = function(s, d)
> + {
> + var max = Math.max,
> + min = Math.min,
> + a = [], // The return value array
> + e, // element
> + i = max(arguments.length - 2, 0), // insert count
> + k = 0,
> + l = this.length,
> + n, // new length
> + v, // delta
> + x; // shift count
>
> + s = s || 0;
> + if (s < 0) {
> + s += l;
> + }
> + s = max(min(s, l), 0); // start point
> + d = max(min(typeof d == 'number' ? d : l, l - s), 0); // delete count
> + v = i - d;
> + n = l + v;
> + while (k < d) {
> + e = this[s + k];
> + if (typeof e != undefined) {
> + a[k] = e;
> + }
> + k += 1;
> + }
> + x = l - s - d;
> + if (v < 0) {
> + k = s + i;
> + while (x) {
> + this[k] = this[k - v];
> + k += 1;
> + x -= 1;
> + }
> + this.length = n;
> + } else if (v > 0) {
> + k = 1;
> + while (x) {
> + this[n - k] = this[l - k];
> + k += 1;
> + x -= 1;
> + }
> + }
> + for (k = 0; k < i; ++k) {
> + this[s + k] = arguments[k + 2];
> + }
> + return a;
> + }
> +}
> +if (typeof Array.push != 'function') {
> + Array.prototype.push = function()
> + {
> + this.splice.apply(this, [this.length,
> 0].concat(this.slice.apply(arguments)));
> + return this.length;
> + }
> +}
> +if (typeof Array.pop != 'function') {
> + Array.prototype.pop = function()
> + {
> + return this.splice(this.length - 1, 1)[0];
> + }
> +}
> +
>  /**
>  * HTML_AJAX static methods, this is the main proxyless api, it also handles
> global error and event handling
>  */
> @@ -189,7 +314,7 @@
>  }
>  }
>  var action = form.action;
> - var el, type, value, name, nameParts;
> + var el, type, value, name, nameParts, useValue = true;
>  var out = '', tags = form.getElementsByTagName('*')
>  childLoop:
>  for (i in tags) {
> @@ -215,6 +340,7 @@
>  case 'radio':
>  if (el.checked) {
>  value = 'checked';
> + useValue = false;
>  break;
>  }
>  // unchecked radios/checkboxes don't get submitted
> @@ -234,12 +360,12 @@
>  // unknown element
>  continue childLoop;
>  }
> - if (typeof value == 'undefined') {
> + if (useValue) {
>  value = el.value;
>  }
>  // add element to output array
>  out += escape(name) + '=' + escape(value) + '&';
> - value = undefined;
> + useValue = true;
>  } // end childLoop
>  var callback = function(result) {
>  target.innerHTML = result;
> @@ -550,259 +676,263 @@
>
>  // create a default client pool with unlimited clients
>  HTML_AJAX.clientPools['default'] = new
> HTML_AJAX_Client_Pool(0);// IframeXHR.js
> -/**
> - * XMLHttpRequest Iframe fallback
> - *
> - *
> http://lxr.mozilla.org/seamonkey/source/extensions/xmlextras/tests/
> - should work with these
> - *
> - * @category HTML
> - * @package AJAX
> - * @author Elizabeth Smith <auroraeosrose at gmail.com>
> - * @copyright 2005 Elizabeth Smith
> - * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
> - */
> -HTML_AJAX_IframeXHR_instances = new Object();
> -function HTML_AJAX_IframeXHR() {
> - this._id = 'HAXHR_iframe_' + new Date().getTime();
> - HTML_AJAX_IframeXHR_instances[this._id] = this;
> - }
> -HTML_AJAX_IframeXHR.prototype = {
> -// Data not sent with text/xml Content-Type will only be available via the
> responseText property
> -
> - // properties available in safari/mozilla/IE xmlhttprequest object
> - onreadystatechange: null, // Event handler for an event that fires at
> every state change
> - readyState: 0, // Object status integer: 0 = uninitialized 1 = loading 2 =
> loaded 3 = interactive 4 = complete
> - responseText: '', // String version of data returned from server process
> - responseXML: null, // DOM-compatible document object of data returned from
> server process
> - status: 0, // Numeric code returned by server, such as 404 for "Not Found"
> or 200 for "OK"
> - statusText: '', // String message accompanying the status code
> - iframe: true, // flag for iframe
> -
> - //these are private properties used internally to keep track of stuff
> - _id: null, // iframe id, unique to object(hopefully)
> - _url: null, // url sent by open
> - _method: null, // get or post
> - _async: null, // sync or async sent by open
> - _headers: new Object(), //request headers to send, actually sent as form
> vars
> - _response: new Object(), //response headers received
> - _phpclass: null, //class to send
> - _phpmethod: null, //method to send
> - _history: null, // opera has to have history munging
> -
> - // Stops the current request
> - abort: function()
> - {
> - var iframe = document.getElementById(this._id);
> - if(iframe)
> - {
> - document.body.removeChild(iframe);
> - }
> - if(this._timeout)
> - {
> - window.clearTimeout(this._timeout);
> - }
> - this.readyState = 1;
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - },
> -
> - // This will send all headers in this._response and will include
> lastModified and contentType if not already set
> - getAllResponseHeaders: function()
> - {
> - var string = '';
> - for(i in this._response)
> - {
> - string += i + ' : ' + this._response[i] + "\n";
> - }
> - return string;
> - },
> -
> - // This will use lastModified and contentType if they're not set
> - getResponseHeader: function(header)
> - {
> - if(this._response[header])
> - {
> - return this._response[header];
> - }
> - else
> - {
> - return null;
> - }
> - },
> -
> - // Assigns a label/value pair to the header to be sent with a request
> - setRequestHeader: function(label, value) {
> - this._headers[label] = value;
> - return; },
> -
> - // Assigns destination URL, method, and other optional attributes of a
> pending request
> - open: function(method, url, async, username, password)
> - {
> - if(!document.body)
> - {
> - throw('CANNOT_OPEN_SEND_IN_DOCUMENT_HEAD');
> - }
> - //exceptions for not enough arguments
> - if(!method || !url)
> - {
> - throw('NOT_ENOUGH_ARGUMENTS:METHOD_URL_REQUIRED');
> - }
> - //get and post are only methods accepted
> - if(method == 'post')
> - {
> - this._method = 'post';
> - }
> - else
> - {
> - this._method = 'get';
> - }
> - this._decodeUrl(url);
> - this._async = async;
> - if(!this._async && document.readyState && !window.opera)
> - {
> - throw('IE_DOES_NOT_SUPPORT_SYNC_WITH_IFRAMEXHR');
> - }
> - //set status to loading and call onreadystatechange
> - this.readyState = 1;
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - },
> -
> - // Transmits the request, optionally with postable string or DOM object
> data
> - send: function(content)
> - {
> - //attempt opera history munging
> - if(window.opera)
> - {
> - this._history = window.history.length;
> - }
> - //create a "form" for the contents of the iframe
> - var form = '<html><body><form method="' + this._method + '" action="' +
> this._url + '">';
> - //tell iframe unwrapper this IS an iframe
> - form += '<input name="Iframe_XHR" value="1" />';
> - //class and method
> - if(this._phpclass != null)
> - {
> - form += '<input name="Iframe_XHR_class" value="' + this._phpclass + '"
> />';
> - }
> - if(this._phpmethod != null)
> - {
> - form += '<input name="Iframe_XHR_method" value="' + this._phpmethod + '"
> />';
> - }
> - // fake headers
> - for(label in this._headers)
> - {
> - form += '<textarea name="Iframe_XHR_headers[]">' + label +':'+
> this._headers[label] + '</textarea>';
> - }
> - // add id
> - form += '<textarea name="Iframe_XHR_id">' + this._id + '</textarea>';
> - if(content != null && content.length > 0)
> - {
> - form += '<textarea name="Iframe_XHR_data">' + content + '</textarea>';
> - }
> - form +=
> '<s'+'cript>document.forms[0].submit();</s'+'cript></form></body></html>';
> - form = "javascript:document.write('" + form.replace(/\'/g,"\\'") +
> "');void(0);";
> - this.readyState = 2;
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - // try to create an iframe with createElement and append node
> - try {
> - var iframe = document.createElement('iframe');
> - iframe.id = this._id;
> - // display: none will fail on some browsers
> - iframe.style.visibility = 'hidden';
> - // for old browsers with crappy css
> - iframe.style.border = '0';
> - iframe.style.width = '0';
> - iframe.style.height = '0';
> - iframe.src = form;
> - document.body.appendChild(iframe);
> - } catch(exception) {
> - // dom failed, write the sucker manually
> - var html = '<iframe src="' + form +'" id="' + id + '"
> style="visibility:hidden;border:0;height:0;width:0;"></iframe>';
> - document.body.innerHTML += html;
> - }
> - if(this._async == true)
> - {
> - //avoid race state if onload is called first
> - if(this.readyState < 3)
> - {
> - this.readyState = 3;
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - }
> - }
> - else
> - {
> - //we force a while loop for sync, it's ugly but hopefully it works
> - while(this.readyState != 4)
> - {
> - //just check to see if we can up readyState
> - if(this.readyState < 3)
> - {
> - this.readyState = 3;
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - }
> - }
> - }
> - },
> -
> - // attached as an onload function to the iframe to trigger when we're done
> - isLoaded: function(headers, data)
> - {
> - this.readyState = 4;
> - //set responseText, Status, StatusText
> - this.status = 200;
> - this.statusText = 'OK';
> - this.responseText = data;
> - this._response = headers;
> - if(!this._response['Last-Modified'])
> - {
> - string += 'Last-Modified : ' +
> document.getElementById(this._id).lastModified + "\n";
> - }
> - if(!this._response['Content-Type'])
> - {
> - string += 'Content-Type : ' +
> document.getElementById(this._id).contentType + "\n";
> - }
> - //attempt opera history munging
> - if(window.opera)
> - {
> - //go back current history - old history
> - window.history.go(this._history - window.history.length);
> - }
> - if(typeof(this.onreadystatechange) == "function")
> - this.onreadystatechange();
> - document.body.removeChild(document.getElementById(this._id));
> - },
> -
> - // strip off the c and m from the url send...yuck
> - _decodeUrl: function(url)
> - {
> - var item = url.split('?');
> - this._url = item[0];
> - if(item[1])
> - {
> - item = item[1].split('&');
> - for(i in item)
> - {
> - var v = item[i].split('=');
> - if(v[0] == 'c')
> - {
> - this._phpclass = v[1];
> - }
> - else if(v[0] == 'm')
> - {
> - this._phpmethod = v[1];
> - }
> - }
> - }
> - else
> - {
> - throw('GRAB_METHODS_DO_NOT_WORK_WITH_IFRAMEXHR');
> - }
> - }
> -}
> +/**
> + * XMLHttpRequest Iframe fallback
> + *
> + *
> http://lxr.mozilla.org/seamonkey/source/extensions/xmlextras/tests/
> - should work with these
> + *
> + * @category HTML
> + * @package AJAX
> + * @author Elizabeth Smith <auroraeosrose at gmail.com>
> + * @copyright 2005 Elizabeth Smith
> + * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
> + */
> +HTML_AJAX_IframeXHR_instances = new Object();
> +function HTML_AJAX_IframeXHR() {
> + this._id = 'HAXHR_iframe_' + new Date().getTime();
> + HTML_AJAX_IframeXHR_instances[this._id] = this;
> + }
> +HTML_AJAX_IframeXHR.prototype = {
> +// Data not sent with text/xml Content-Type will only be available via the
> responseText property
> +
> + // properties available in safari/mozilla/IE xmlhttprequest object
> + onreadystatechange: null, // Event handler for an event that fires at
> every state change
> + readyState: 0, // Object status integer: 0 = uninitialized 1 = loading 2 =
> loaded 3 = interactive 4 = complete
> + responseText: '', // String version of data returned from server process
> + responseXML: null, // DOM-compatible document object of data returned from
> server process
> + status: 0, // Numeric code returned by server, such as 404 for "Not Found"
> or 200 for "OK"
> + statusText: '', // String message accompanying the status code
> + iframe: true, // flag for iframe
> +
> + //these are private properties used internally to keep track of stuff
> + _id: null, // iframe id, unique to object(hopefully)
> + _url: null, // url sent by open
> + _method: null, // get or post
> + _async: null, // sync or async sent by open
> + _headers: new Object(), //request headers to send, actually sent as form
> vars
> + _response: new Object(), //response headers received
> + _phpclass: null, //class to send
> + _phpmethod: null, //method to send
> + _history: null, // opera has to have history munging
> +
> + // Stops the current request
> + abort: function()
> + {
> + var iframe = document.getElementById(this._id);
> + if(iframe)
> + {
> + document.body.removeChild(iframe);
> + }
> + if(this._timeout)
> + {
> + window.clearTimeout(this._timeout);
> + }
> + this.readyState = 1;
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + },
> +
> + // This will send all headers in this._response and will include
> lastModified and contentType if not already set
> + getAllResponseHeaders: function()
> + {
> + var string = '';
> + for(i in this._response)
> + {
> + string += i + ' : ' + this._response[i] + "\n";
> + }
> + return string;
> + },
> +
> + // This will use lastModified and contentType if they're not set
> + getResponseHeader: function(header)
> + {
> + if(this._response[header])
> + {
> + return this._response[header];
> + }
> + else
> + {
> + return null;
> + }
> + },
> +
> + // Assigns a label/value pair to the header to be sent with a request
> + setRequestHeader: function(label, value) {
> + this._headers[label] = value;
> + return; },
> +
> + // Assigns destination URL, method, and other optional attributes of a
> pending request
> + open: function(method, url, async, username, password)
> + {
> + if(!document.body)
> + {
> + throw('CANNOT_OPEN_SEND_IN_DOCUMENT_HEAD');
> + }
> + //exceptions for not enough arguments
> + if(!method || !url)
> + {
> + throw('NOT_ENOUGH_ARGUMENTS:METHOD_URL_REQUIRED');
> + }
> + //get and post are only methods accepted
> + if(method == 'post')
> + {
> + this._method = 'post';
> + }
> + else
> + {
> + this._method = 'get';
> + }
> + this._decodeUrl(url);
> + this._async = async;
> + if(!this._async && document.readyState && !window.opera)
> + {
> + throw('IE_DOES_NOT_SUPPORT_SYNC_WITH_IFRAMEXHR');
> + }
> + //set status to loading and call onreadystatechange
> + this.readyState = 1;
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + },
> +
> + // Transmits the request, optionally with postable string or DOM object
> data
> + send: function(content)
> + {
> + //attempt opera history munging
> + if(window.opera)
> + {
> + this._history = window.history.length;
> + }
> + //create a "form" for the contents of the iframe
> + var form = '<html><body><form method="' + this._method + '" action="' +
> this._url + '">';
> + //tell iframe unwrapper this IS an iframe
> + form += '<input name="Iframe_XHR" value="1" />';
> + //class and method
> + if(this._phpclass != null)
> + {
> + form += '<input name="Iframe_XHR_class" value="' + this._phpclass + '"
> />';
> + }
> + if(this._phpmethod != null)
> + {
> + form += '<input name="Iframe_XHR_method" value="' + this._phpmethod + '"
> />';
> + }
> + // fake headers
> + for(label in this._headers)
> + {
> + form += '<textarea name="Iframe_XHR_headers[]">' + label +':'+
> this._headers[label] + '</textarea>';
> + }
> + // add id
> + form += '<textarea name="Iframe_XHR_id">' + this._id + '</textarea>';
> + if(content != null && content.length > 0)
> + {
> + form += '<textarea name="Iframe_XHR_data">' + content + '</textarea>';
> + }
> + form +=
> '<s'+'cript>document.forms[0].submit();</s'+'cript></form></body></html>';
> + form = "javascript:document.write('" + form.replace(/\'/g,"\\'") +
> "');void(0);";
> + this.readyState = 2;
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + // try to create an iframe with createElement and append node
> + try {
> + var iframe = document.createElement('iframe');
> + iframe.id = this._id;
> + // display: none will fail on some browsers
> + iframe.style.visibility = 'hidden';
> + // for old browsers with crappy css
> + iframe.style.border = '0';
> + iframe.style.width = '0';
> + iframe.style.height = '0';
> + //alert(form);
> + //iframe.src = form;
> +
> + document.body.appendChild(iframe);
> + //document.getElementById(this._id).src = form;
> + } catch(exception) {
> + // dom failed, write the sucker manually
> + alert(exception);
> + var html = '<iframe src="' + form +'" id="' + id + '"
> style="visibility:hidden;border:0;height:0;width:0;"></iframe>';
> + document.body.innerHTML += html;
> + }
> + if(this._async == true)
> + {
> + //avoid race state if onload is called first
> + if(this.readyState < 3)
> + {
> + this.readyState = 3;
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + }
> + }
> + else
> + {
> + //we force a while loop for sync, it's ugly but hopefully it works
> + while(this.readyState != 4)
> + {
> + //just check to see if we can up readyState
> + if(this.readyState < 3)
> + {
> + this.readyState = 3;
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + }
> + }
> + }
> + },
> +
> + // attached as an onload function to the iframe to trigger when we're done
> + isLoaded: function(headers, data)
> + {
> + this.readyState = 4;
> + //set responseText, Status, StatusText
> + this.status = 200;
> + this.statusText = 'OK';
> + this.responseText = data;
> + this._response = headers;
> + if(!this._response['Last-Modified'])
> + {
> + string += 'Last-Modified : ' +
> document.getElementById(this._id).lastModified + "\n";
> + }
> + if(!this._response['Content-Type'])
> + {
> + string += 'Content-Type : ' +
> document.getElementById(this._id).contentType + "\n";
> + }
> + //attempt opera history munging
> + if(window.opera)
> + {
> + //go back current history - old history
> + window.history.go(this._history - window.history.length);
> + }
> + if(typeof(this.onreadystatechange) == "function")
> + this.onreadystatechange();
> + document.body.removeChild(document.getElementById(this._id));
> + },
> +
> + // strip off the c and m from the url send...yuck
> + _decodeUrl: function(url)
> + {
> + var item = url.split('?');
> + this._url = item[0];
> + if(item[1])
> + {
> + item = item[1].split('&');
> + for(i in item)
> + {
> + var v = item[i].split('=');
> + if(v[0] == 'c')
> + {
> + this._phpclass = v[1];
> + }
> + else if(v[0] == 'm')
> + {
> + this._phpmethod = v[1];
> + }
> + }
> + }
> + else
> + {
> + throw('GRAB_METHODS_DO_NOT_WORK_WITH_IFRAMEXHR');
> + }
> + }
> +}
>  // serializer/UrlSerializer.js
>  // {{{ HTML_AJAX_Serialize_Urlencoded
>  /**
> @@ -814,7 +944,7 @@
>  * array or a string. See
> examples/serialize.url.examples.php
>  *
>  * @version 0.0.1
> - * @copyright 2005 Arpad Ray <arpad at rajeczy.com>
> + * @copyright 2005 Arpad Ray <arpad at php.net>
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  *
>  * See Main.js for Author/license details
> @@ -881,7 +1011,7 @@
>  // null
>  return;
>  }
> - if
> (!/^(?:\w+(?:\[[^\[\]]*\])*=[^&]*(?:&|$))+$/.test(input)) {
> + if (!/^(\w+(\[[^\[\]]*\])*=[^&]*(&|$))+$/.test(input)) {
>  this.raiseError("invalidly formed input", input);
>  return;
>  }
> @@ -898,7 +1028,7 @@
>  }
>  key = unescape(input[i].substr(0, pos));
>  val = unescape(input[i].substr(pos + 1));
> - key = key.replace(/\[((?:\d*\D+)+)\]/g, '["$1"]');
> + key = key.replace(/\[((\d*\D+)+)\]/g, '["$1"]');
>  keys = key.split(']');
>  for (j in keys) {
>  if (!keys[j].length || keys[j].length == 0) {
> @@ -958,7 +1088,7 @@
>  * format compatible with PHP's native serialization functions.
>  *
>  * @version 0.0.3
> - * @copyright 2005 Arpad Ray <arpad at rajeczy.com>
> + * @copyright 2005 Arpad Ray <arpad at php.net>
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  *
>  * See Main.js for Author/license details
> @@ -1305,6 +1435,7 @@
>  // method to initialize an xmlhttpclient
>  init:function()
>  {
> + //this.xmlhttp = new HTML_AJAX_IframeXHR(); return;
>  try {
>  // Mozilla / Safari
>  this.xmlhttp = new XMLHttpRequest();
> @@ -2322,6 +2453,10 @@
>  getType: function(inp)
>  {
>  var type = typeof inp, match;
> + if(type == 'object' && !inp)
> + {
> + return 'null';
> + }
>  if (type == "object") {
>  if(!inp.constructor)
>  {
>
>
> Modified: trunk/js/HttpClient.js (292 => 293) --- trunk/js/HttpClient.js
> 2005-12-02 17:02:57 UTC (rev 292)
> +++ trunk/js/HttpClient.js 2005-12-02 17:14:25 UTC (rev 293)
> @@ -17,6 +17,7 @@
>  // method to initialize an xmlhttpclient
>  init:function()
>  {
> + //this.xmlhttp = new HTML_AJAX_IframeXHR(); return;
>  try {
>  // Mozilla / Safari
>  this.xmlhttp = new XMLHttpRequest();
>
>
> Modified: trunk/js/serializer/UrlSerializer.js (292 => 293)
> --- trunk/js/serializer/UrlSerializer.js 2005-12-02
> 17:02:57 UTC (rev 292)
> +++ trunk/js/serializer/UrlSerializer.js 2005-12-02
> 17:14:25 UTC (rev 293)
> @@ -8,7 +8,7 @@
>  * array or a string. See
> examples/serialize.url.examples.php
>  *
>  * @version 0.0.1
> - * @copyright 2005 Arpad Ray <arpad at rajeczy.com>
> + * @copyright 2005 Arpad Ray <arpad at php.net>
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  *
>  * See Main.js for Author/license details
>
>
> Modified: trunk/js/serializer/phpSerializer.js (292 => 293)
> --- trunk/js/serializer/phpSerializer.js 2005-12-02
> 17:02:57 UTC (rev 292)
> +++ trunk/js/serializer/phpSerializer.js 2005-12-02
> 17:14:25 UTC (rev 293)
> @@ -6,7 +6,7 @@
>  * format compatible with PHP's native serialization functions.
>  *
>  * @version 0.0.3
> - * @copyright 2005 Arpad Ray <arpad at rajeczy.com>
> + * @copyright 2005 Arpad Ray <arpad at php.net>
>  * @license
> http://www.opensource.org/licenses/lgpl-license.php LGPL
>  *
>  * See Main.js for Author/license details
>
>
>
> _______________________________________________
> Html_ajax-svn mailing list
> Html_ajax-svn at lists.bluga.net
> http://lists.bluga.net/mailman/listinfo/html_ajax-svn
>
>
>


More information about the Html_ajax-svn mailing list