From: Argiris K. <be...@us...> - 2005-11-10 12:53:17
|
Update of /cvsroot/magicajax/MagicAjax NET 1.1/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21307/script Modified Files: CallBackObject.js Log Message: Many changes to get NoStore page mode working. Set it as the default mode. Index: CallBackObject.js =================================================================== RCS file: /cvsroot/magicajax/MagicAjax NET 1.1/script/CallBackObject.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CallBackObject.js 8 Nov 2005 07:53:33 -0000 1.3 --- CallBackObject.js 10 Nov 2005 12:53:09 -0000 1.4 *************** *** 1,5 **** __AJAXCboList = new Array(); __bPageIsStored = false; - __initialRBSControlsHtml = new Array(); __PreviousOnFormSubmit = null; __PreviousPostBack = null; --- 1,4 ---- *************** *** 118,129 **** window.onunload = this.OnPageUnload; } - else - { - if (typeof(RBS_Controls) != "undefined") - { - for (var i=0; i < RBS_Controls.length; i++) - __initialRBSControlsHtml[RBS_Controls[i].id] = RBS_Controls[i].innerHTML; - } - } __bPageIsStored = bPageIsStored; --- 117,120 ---- *************** *** 230,235 **** var eName = ''; ! theData = '__AJAX_EVENTTARGET=' + escape(eventTarget.split("$").join(":")) + '&'; ! theData += '__AJAX_EVENTARGUMENT=' + encodeURIComponent(eventArgument) + '&'; if ( ! __bPageIsStored ) --- 221,227 ---- var eName = ''; ! theData = '__EVENTTARGET=' + escape(eventTarget.split("$").join(":")) + '&'; ! theData += '__EVENTARGUMENT=' + encodeURIComponent(eventArgument) + '&'; ! theData += '__AJAX_CALLBACK=true&'; if ( ! __bPageIsStored ) *************** *** 292,305 **** __AJAXCboList.push(oThis); AJAXCbo = new CallBackObject(); - var httpMethod = "POST"; - - if ( ! __bPageIsStored ) - { - // Do a GET callback so that the page can be initialized - httpMethod = "GET"; - thePage += (thePage.indexOf("?") == -1) ? "?" : "&"; - thePage += "__AJAX_FORMDATA=" + encodeURIComponent(theData); - theData = null; - } if( this.XmlHttp.readyState == 4 || this.XmlHttp.readyState == 0 ) --- 284,287 ---- *************** *** 308,312 **** { // Asynchronous ! this.XmlHttp.open(httpMethod, thePage, true); this.XmlHttp.onreadystatechange = function(){ oThis.ReadyStateChange(); }; this.XmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); --- 290,294 ---- { // Asynchronous ! this.XmlHttp.open("POST", thePage, true); this.XmlHttp.onreadystatechange = function(){ oThis.ReadyStateChange(); }; this.XmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); *************** *** 321,325 **** function() { ! oThis.XmlHttp.open(httpMethod, thePage, false); oThis.XmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oThis.XmlHttp.send(theData); --- 303,307 ---- function() { ! oThis.XmlHttp.open("POST", thePage, false); oThis.XmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oThis.XmlHttp.send(theData); *************** *** 360,374 **** return false; - // If the page is not stored at the server, restore the initial page - // before applying the changes that occured during the callback. - if ( ! __bPageIsStored ) - { - if (typeof(RBS_Controls) != "undefined") - { - for (var i=0; i < RBS_Controls.length; i++) - AJAXCbo.RestoreHtml(RBS_Controls[i], __initialRBSControlsHtml[RBS_Controls[i].id]); - } - } - eval(responseText); --- 342,345 ---- |