2つのページがあります。1つはメインページで、もう1つはデータを取得してメインページに送信するポップアップです。ChromeとFFでは問題なく動作するようですが、IEでは動作しません。「そのようなインターフェイスはサポートされていません」というエラーメッセージが表示されます。これは、私がIEでテストするように依頼するすべての人に起こるようです。
メインページに動的な行を追加する方法と関係があると思います。私はそれを正しく行うためにどうすればいいのかよくわかりません。
私が使用するコードは次のとおりです。
function addRowForPC(pcT,pcP) {
try {
var tableID="Equipment";
var table = window.opener.document.getElementById(tableID);
var rowCount = table.rows.length - 0;
var row = table.insertRow(rowCount);
insertFld( "delEquip", "image" , table, rowCount, row, 0 ) //Image
insertFld( pcT , "text" , table, rowCount, row, 1 ) //Text
insertFld( pcP , "textSpan", table, rowCount, row, 2 ) //Text
}
catch(err) {
alert(err.message);
return "Fail";
}
}
//This calls: to create the rows:
function insertFld(fldName,fldType,table,rowCount,row,insCell) {
try {
var cellName = "cell" + (insCell+1);
cellName = row.insertCell(insCell);
switch (fldType) {
case "image":
var image = document.createElement('img');
image.src="Images/delete.jpg";
image.alt ="Remove";
image.name=fldName +rowCount;
image.setAttribute('width','10');
image.setAttribute('height','10');
image.onclick= function(){deleteRow(this)};
cellName.appendChild(image);
break;
case "text":
cellName.innerHTML = fldName;
break;
case "textSpan":
cellName.colSpan="2";
cellName.innerHTML = fldName;
break;
}
}
catch(err) {
alert (err.message);
}
}
どんな助け/ガイダンスも素晴らしいでしょう。私はJavaScript/HTMLを初めて使用するので、jQueryでどこから始めるのかさえ本当にわかりません。
ありがとう。