複数の入力フィールドをポップアップ ページに渡そうとしています。これが私がやったことです:
<tr>
<th>Item Category</th>
<td><input type="text" name="object_category" disabled="disabled" id="pid1" />
</td>
<tr>
<th>Item Name</th>
<td><input type="text" name="object_name" disabled="disabled" id="pid2" />
<input type="button" id="item_name" name="choice" onClick="selectValue2('id2')" value="?"></td>
</tr>
の値は、別のページからその値を返すことによって埋められます。
pid1
ここで、id:と id:の値をpid2
、javascript を使用して新しいポップアップ ページに渡したいと思います。これが私のselectValue2()
関数定義です:
function selectValue2(pid2){
// open popup window and pass field id
var category = getElementById('pid1');
window.open("search_item.php?id=pid2&&cat="+category+""",'popuppage',
'width=600,toolbar=1,resizable=0,scrollbars=yes,height=400,top=100,left=100');
}
ただし、ポップアップが開かないため、selectValue2 は機能しません。これら 2 つのフィールドの値を新しいポップアップに渡す方法は?