我的彈出窗口從用戶可以從中選擇的數據庫獲取數據。現在 能有人爲我解釋一下我怎麼可以從我的彈出窗口提交的數據(陣列)回我 父窗體和回「父母PHP」之後:X從POPUP窗口獲取數據返回到父項(SMARTY)
我已經發現使用
方式window.opener.document.forms.form_id.inputname.value
或
window.opener.document.getElementById('inputname').value
,但我真的不知道該怎麼做,以及如何讓它爲我工作。
父窗體:
<form method="POST" name="big_form">
popupcode父:
function popup(Location,w,h) //opens new window
{
var options = "width=" + w + ",height=" + h;
options += ",menubar=no,location=no,resizable=0,scrollbars,top=500,left=500";
var newwin = window.open(Location,'newWin',options);
if (newwin == null)
{
// The popup got blocked, notify the user
return false;
}
newwin.focus();
}
<input class="myButton" onclick="popup('?n=popup_arbeitsplatz','800','800');" style='font: bold 10px Arial;height:25px;
padding: 2px 6px 2px 6px;
width:25px;' value="A" type="button" />
艇員選拔數據那麼他應該保存(提交)並關閉彈出窗口後。 現在數據不應該以某種方式直接顯示在PARENT中。我只需要它存儲在某個地方,並能夠操縱我的PARENTS PHP中的數據。 我嘗試了很多東西,例如在會話中保存或在我的PARENTS PHP中包含,並嘗試使用$ _POST獲取數據..沒有任何工作。
也許別的東西然後window.opener我真的不在乎我只是想我的數據莫名其妙:D。
哎ty尋求幫助。我試過,但最後我得到一個數組:未分配:X – user3091456