Update of /cvsroot/magicajax/magicajax/Core/script
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31823/Core/script
Modified Files:
AjaxCallObject.js
Log Message:
Minor modification for Page state cache and IsMagicAjaxSupportedBrowser.
Index: AjaxCallObject.js
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** AjaxCallObject.js 21 Nov 2005 15:20:12 -0000 1.14
--- AjaxCallObject.js 21 Nov 2005 16:32:42 -0000 1.15
***************
*** 1,5 ****
__AJAXCboList = new Array();
__bPageIsStored = false;
! __PageStateCache = null;
__bTracing = false;
__PreviousOnFormSubmit = null;
--- 1,5 ----
__AJAXCboList = new Array();
__bPageIsStored = false;
! __PageStateCacheName = null;
__bTracing = false;
__PreviousOnFormSubmit = null;
***************
*** 61,65 ****
}
! AjaxCallObject.prototype.HookAjaxCall = function(bPageIsStored, bUnloadStoredPage, pageStateCache, bTracing)
{
__PreviousOnFormSubmit = document.forms[0].onsubmit;
--- 61,65 ----
}
! AjaxCallObject.prototype.HookAjaxCall = function(bPageIsStored, bUnloadStoredPage, pageStateCacheName, bTracing)
{
__PreviousOnFormSubmit = document.forms[0].onsubmit;
***************
*** 73,80 ****
__bPageIsStored = bPageIsStored;
! __PageStateCache = pageStateCache;
__bTracing = bTracing;
! __PageStateCache.setAttribute("ExcludeFromPost", "true");
if ( !bPageIsStored || !bUnloadStoredPage )
--- 73,80 ----
__bPageIsStored = bPageIsStored;
! __PageStateCacheName = pageStateCacheName;
__bTracing = bTracing;
! document.forms[0][__PageStateCacheName].setAttribute("ExcludeFromPost", "true");
if ( !bPageIsStored || !bUnloadStoredPage )
***************
*** 162,170 ****
{
// Restore the html of form
! var html = __PageStateCache.value;
if (html != "")
{
document.forms[0].innerHTML = decodeURIComponent(html.substr(5));
! __PageStateCache.value = "";
}
--- 162,170 ----
{
// Restore the html of form
! var html = document.forms[0][__PageStateCacheName].value;
if (html != "")
{
document.forms[0].innerHTML = decodeURIComponent(html.substr(5));
! document.forms[0][__PageStateCacheName].value = "";
}
***************
*** 177,181 ****
// Save the html of the form, so that it can be restored for the
// browser's "Back Button"
! __PageStateCache.value = "HTML:" + encodeURIComponent(document.forms[0].innerHTML);
if (__PreviousOnPageBeforeUnload != null)
--- 177,181 ----
// Save the html of the form, so that it can be restored for the
// browser's "Back Button"
! document.forms[0][__PageStateCacheName].value = "HTML:" + encodeURIComponent(document.forms[0].innerHTML);
if (__PreviousOnPageBeforeUnload != null)
***************
*** 428,431 ****
--- 428,435 ----
{
this.WriteTrace("<b>Ajax Call invoked at " + new Date().toLocaleTimeString() + "<br>");
+ if (__bPageIsStored)
+ this.WriteTrace("Page Store Mode: Stored (Session or Cache)<br>");
+ else
+ this.WriteTrace("Page Store Mode: NoStore<br>");
this.WriteTrace("Form Data sent to server (" + data.length + " characters):<br>");
this.WriteTrace("------------------------------</b><br>");
|