我有一個彈出提交表單,一旦我提交它應該加載一個彈出窗口到我當前的窗口使用window.load方法。問題是,我總是被重定向到該窗口(imagine_decupare.php),沒有得到該窗口作爲當前窗口中的彈出窗口加載。 任何想法爲什麼?Pop onload不工作
function hide_popup(id){
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == ""){
obj.style.display = "none";
}
}
}
function poponload(){
testwindow = window.open("decupare_imagine.php","mywindow","location=0,status=1,scrollbars=1,width=100,height=100");
testwindow.moveTo(0, 0);
}
<form action="decupare_imagine.php" method="post" >
<input type="text" name="alt-rol" value="<?php echo $data[1];?>" style="display:none;" />
<a href="javascript:hide_popup('my_popup<?=$data[1]?>')" style="width:5%;float:left;margin: 0 0 0 90%"><img src="../images/icon_error.gif"> </a>
<div class="radio_pop">
//some data to be sent
</div>
<input type="submit" value="Tip imagine" class="buton_imagine" onclick="javascript:hide_popup('my_popup<?=$data[1]?>');" onsubmit="javascript: poponload()" style="width:100%;float:left;" />
</form>
不是它不工作 – Johny 2013-02-19 08:00:13