说明:此方案修复了发帖出错和任务框不能点击等问题。修改牵涉面比较广,但目前能考虑到的几种情况已经解决,请修改代码前进行备份。
具体修改内容:打开文件js/pw_ajax.js,找到79行左右,将代码
load : function() { if (is_ie) { ajax.request.responseText = (typeof ajax.request.iframe.contentWindow.document.XMLDocument != 'undefined') ? ajax.request.iframe.contentWindow.document.XMLDocument.text : null; ajax.request.iframe.detachEvent('onload',ajax.load); } else { ajax.request.responseText = ajax.request.iframe.contentWindow.document.documentElement.textContent; ajax.request.iframe.removeEventListener('load',ajax.load,true); } try{if (self.ajaxiframe.location.href == 'about:blank'){return '';}}catch(e){} if (typeof(ajax.recall) == 'function') { ajax.recall(); } },
修改为以下代码:
load : function() { if(!ajax.request.iframe.contentWindow){ return false; } var _innerText=ajax.request.iframe.contentWindow.document.documentElement.innerText; var _textContent=ajax.request.iframe.contentWindow.document.documentElement.textContent; if(_innerText=="undefined"||_textContent=="undefined"){ return false; } if(-[1,]){ ajax.request.responseText=_textContent; }else{ var txt = ajax.request.iframe.contentWindow.document.documentElement.innerText; var rules = //.exec(txt); if(rules && rules[1]){ ajax.request.responseText=rules[1].replace(/^s+|s+$/g,''); }else{ ajax.request.responseText=_innerText; } } if (ajax.request.iframe.detachEvent) { ajax.request.iframe.detachEvent('onload',ajax.load); } else { ajax.request.iframe.removeEventListener('load',ajax.load,true); } //try{if (ajax.request.iframe.location.href == 'about:blank'){return '';}}catch(e){} if (typeof(ajax.recall) == 'function') { ajax.recall(); ajax.doscript(); } //fixed for tt browser (register page) if (typeof ajaxclearhistory == 'undefined')ajax.request.clearhistroy(); },
修改后完美解决了phpwind 7.2 7.5 8.0等UTF8版本在IE8、9内核,360浏览器下,不能注册的问题。出错状态表现为输入用户名时得到提示:用户名长度错误!但是长度是符合的。