Update of /cvsroot/magicajax/magicajax/Core/script
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17070/magicajax/Core/script
Modified Files:
AjaxCallObject.js
Log Message:
- Added support for Netscape 8
Note: Netscape 8 has a problem using replaceChild when replaced child contains a table. So in case Netscape8, first an insertBefore and then a removeChild is done.
Index: AjaxCallObject.js
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** AjaxCallObject.js 27 Dec 2005 22:03:42 -0000 1.38
--- AjaxCallObject.js 28 Dec 2005 11:53:46 -0000 1.39
***************
*** 10,13 ****
--- 10,14 ----
__TraceWindows = new Array();
__ClockID = 0;
+ __Netscape8AndUp = false;
// Excluding from post flags
***************
*** 195,198 ****
--- 196,201 ----
AjaxCallObject.prototype.HookAjaxCall = function(bPageIsStored, bUnloadStoredPage, bTracing)
{
+ __Netscape8AndUp = navigator.appName == "Netscape" && navigator.vendor == "Netscape" && parseInt(navigator.appVersion) >= 5;
+
__PreviousOnFormSubmit = document.forms[0].onsubmit;
document.forms[0].onsubmit = this.OnFormSubmit;
***************
*** 779,784 ****
}
}
!
! place.parentNode.replaceChild(store, place);
}
}
--- 782,796 ----
}
}
!
! if (__Netscape8AndUp)
! {
! //Netscape 8 has a problem using replaceChild when replaced child contains a table
! place.parentNode.insertBefore(store, place);
! place.parentNode.removeChild(place);
! }
! else
! place.parentNode.replaceChild(store, place);
!
! place = null; //cleanup
}
}
|