From: Dion O. <dol...@us...> - 2005-11-19 09:48:27
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16575/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: - Used 'AJAXCbo.SetFieldIfEmptyScript' to fill the fingerprint hidden fields from script. - Changed some document.all statements in AjaxCallObject.js (because document.all is IE only?) Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AjaxCallObject.js 18 Nov 2005 18:53:07 -0000 1.9 --- AjaxCallObject.js 19 Nov 2005 09:48:19 -0000 1.10 *************** *** 193,197 **** AjaxCallObject.prototype.OnPageUnload = function() { ! if (document.all["__AJAX_PAGEKEY"] == null) return; --- 193,197 ---- AjaxCallObject.prototype.OnPageUnload = function() { ! if (document.forms[0]["__AJAX_PAGEKEY"] == null) return; *************** *** 201,205 **** thePage = thePage.substring(0, index); ! thePage = thePage + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.all["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; --- 201,205 ---- thePage = thePage.substring(0, index); ! thePage = thePage + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.forms[0]["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; *************** *** 455,459 **** AjaxCallObject.prototype.SetFieldScript = function(fieldName, fieldValue) { ! document.all.item(fieldName).value = fieldValue; } --- 455,468 ---- AjaxCallObject.prototype.SetFieldScript = function(fieldName, fieldValue) { ! var field = document.forms[0][fieldName]; ! if (field != null) ! field.value = fieldValue; ! } ! ! AjaxCallObject.prototype.SetFieldIfEmptyScript = function(fieldName, fieldValue) ! { ! var field = document.forms[0][fieldName]; ! if (field != null && field.value == '') ! field.value = fieldValue; } |