2016-06-20 293 views
0

你能告訴我我的代碼有什麼問題嗎?彈出窗口不顯示

<script type="text/javascript"> 
    function PopupCenter(pageURL, title,w,h) 
      { 
       var left = (screen.width/2)-(w/2); 
       var top = (screen.height/2)-(h/2); 
       var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); 
      } 
      </script> 
      </head> 


echo "<td><a href='#' onclick='PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)'> View</a></td>"; 
+0

你爲什麼問我們?你有錯誤嗎?如果是這樣,那是什麼? – jiboulex

+0

請提供您的函數PopupCenter代碼。 –

回答

1

嘗試刪除一個報價:

從這:

echo "<td><a href='#' onclick='PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)'> View</a></td>"; 

要這樣:

echo "<td><a href='#' onclick=PopupCenter('viewitem.php?Rid=".$row['refnumber']."','myPop1',1000,800)> View</a></td>"; 

希望工程。

+0

我希望你得到它的感謝。 – codeSeven