2006-12-31 Igor Zelmanovich <igorz@mainsoft.com>
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Sun, 31 Dec 2006 14:17:22 +0000 (14:17 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Sun, 31 Dec 2006 14:17:22 +0000 (14:17 -0000)
* callback.js: fixed: support IE7, encodeURIComponent is used to
encode the form.

svn path=/trunk/mcs/; revision=70281

mcs/class/System.Web/resources/ChangeLog
mcs/class/System.Web/resources/callback.js

index ce87948f6292749572de2e7a8d36ebfb7ba8e007..6dc6b03b83cc022b81d0793f3b0a284e08575644 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-31 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * callback.js: fixed: support IE7, encodeURIComponent is used to 
+       encode form.
+
 2006-09-14 Igor Zelmanovich <igorz@mainsoft.com>
 
        * WebUIValidation_2.0.js: added new file
index bdab5971b356621e14da4f5b8bf868a2fc132e24..0523d8683a5d37b4632ec35a1056096c63da383b 100644 (file)
@@ -24,7 +24,7 @@ function WebForm_getFormData ()
        for (n=0; n<len; n++) {
                var elem = theForm.elements [n];
                if (qs.length > 0) qs += "&";
-               qs += elem.name + "=" + escape (elem.value);
+               qs += elem.name + "=" + encodeURIComponent (elem.value);
        }
        return qs;
 }
@@ -36,7 +36,6 @@ function WebForm_httpPost (url, data, callback)
        
        if (typeof XMLHttpRequest != "undefined") {
                httpPost = new XMLHttpRequest ();
-               httpPost.addEventListener ("load", function () { callback (httpPost);}, false );
        } else {
                if (axName != null)
                        httpPost = new ActiveXObject (axName);
@@ -51,8 +50,8 @@ function WebForm_httpPost (url, data, callback)
                        if (httpPost == null)
                                throw new Error ("XMLHTTP object could not be created.");
                }
-               httpPost.onreadystatechange = function () { if (httpPost.readyState == 4) callback (httpPost); };
        }
+       httpPost.onreadystatechange = function () { if (httpPost.readyState == 4) callback (httpPost); };
        
        httpPost.open ("POST", url, true);      // async
        httpPost.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");