私はJavaScriptコードが1000行以上あるので、ページが非常に重いページを書いています。 私は、Firefoxでページを実行すると、それは私にその教え:JavaScriptが「このページのスクリプトがビジーであるか、応答が停止している可能性があります。 Firefoxのエラー
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: http://localhost:5070/resources/ir.pnusn.branch.ui.pages.BranchMap/scripts/MapAddress.js:151
を、私はMyAddress.jsを持っている:151:
function fillAddress(number)
{
150: var filedNum=0;
151: while(document.getElementById("choice4")!=null)
document.getElementById("choice4").click();
nextId=1;
for(i=0;;i++)
{
var cookieChoiceName=number+"-"+filedNum+"-0";
var cookieChoiceValue=getCookie(cookieChoiceName);
if(cookieChoiceValue==null)
{
//alert(document.getElementById("choice4"));
break;
}
var cookieFieldName=number+"-"+filedNum+"-1";
var cookieFieldValue=getCookie(cookieFieldName);
if(cookieFieldValue==null)
{
alert(document.getElementById("choice4"));
break;
}
if(cookieChoiceValue!= "-1" && cookieChoiceValue!="-2" && document.getElementById("choice"+cookieChoiceValue)!=null)
{
document.getElementById("choice"+cookieChoiceValue).click();
}
var value=utf8_decode(unescape(cookieFieldValue));
var finalval=replacePluse(value);
// var Resvalue=value.substr(1,value.length-1);
document.getElementById("txt"+(filedNum-1)).value=finalval;
filedNum++;
}
}
と私は、コードの作業警告ウィンドウに引き続き押します正しく しかし、Firefoxの設定ファイルでdom.max_script_run_timeを増やしても、変更されない場合は、 を変更してから、もう一度続行してください。 何が問題なのですか?コードについての詳しい情報が必要な場合は、私にあなたのために置くように教えてください。
私はページにいくつかのtextfiledsを無効にするためのいくつかのコードを追加する前に、それはこの警告なしで動作しますので、それは無限ループのためではないと思います。 – JGC