From: Argiris K. <be...@us...> - 2005-11-08 07:53:41
|
Update of /cvsroot/magicajax/MagicAjax NET 1.1/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13417/script Modified Files: CallBackObject.js Log Message: Fixed a encoding bug. Now works properly if default document is missing from the url. Index: CallBackObject.js =================================================================== RCS file: /cvsroot/magicajax/MagicAjax NET 1.1/script/CallBackObject.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CallBackObject.js 7 Nov 2005 06:44:08 -0000 1.2 --- CallBackObject.js 8 Nov 2005 07:53:33 -0000 1.3 *************** *** 200,204 **** CallBackObject.prototype.OnPageUnload = function() { ! var thePage = window.location.pathname + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.all["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; --- 200,209 ---- CallBackObject.prototype.OnPageUnload = function() { ! var thePage = document.forms[0].action; ! var index = thePage.indexOf("?"); ! if (index != -1) ! thePage = thePage.substring(0, index); ! ! thePage = thePage + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.all["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; *************** *** 222,230 **** var theData = ''; var theform = document.forms[0]; ! var thePage = window.location.pathname + window.location.search; var eName = ''; theData = '__AJAX_EVENTTARGET=' + escape(eventTarget.split("$").join(":")) + '&'; ! theData += '__AJAX_EVENTARGUMENT=' + escape(eventArgument).split("+").join("%2B") + '&'; if ( ! __bPageIsStored ) --- 227,235 ---- var theData = ''; var theform = document.forms[0]; ! var thePage = theform.action; var eName = ''; theData = '__AJAX_EVENTTARGET=' + escape(eventTarget.split("$").join(":")) + '&'; ! theData += '__AJAX_EVENTARGUMENT=' + encodeURIComponent(eventArgument) + '&'; if ( ! __bPageIsStored ) *************** *** 255,259 **** } ! val = escape(val).split("+").join("%2B"); if ( type == "select-multiple" ) --- 260,264 ---- } ! val = encodeURIComponent(val); if ( type == "select-multiple" ) *************** *** 261,265 **** for (var j=0; j < theform.elements[i].options.length; j++) if (theform.elements[i].options[j].selected) ! theData = theData + escape(eName.split("$").join(":")) + '=' + escape(theform.elements[i].options[j].value).split("+").join("%2B") + '&'; } else if ( (type != "checkbox" && type != "radio") || theform.elements[i].checked ) --- 266,270 ---- for (var j=0; j < theform.elements[i].options.length; j++) if (theform.elements[i].options[j].selected) ! theData = theData + escape(eName.split("$").join(":")) + '=' + encodeURIComponent(theform.elements[i].options[j].value) + '&'; } else if ( (type != "checkbox" && type != "radio") || theform.elements[i].checked ) |