2012-08-17 93 views
0

我使用cakephp框架。我試圖發送電子郵件,我想要一個鏈接,這將打開一個新的彈出窗口。但是當我嘗試點擊url時,它顯示url爲nojavascript:newPopup(url); 請幫我一把。蛋糕PHP電子郵件 - 包括電子郵件中的鏈接

<script type="text/javascript"> 
// Popup window code 
function newPopup(url) { 
popupWindow = window.open(url,'popUpWindow','height=600,width=900,left=10,top=10,resizable=yes, 
scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes'); 
} 
</script> 

<a href="javascript:newPopup('<?php echo $this->Html->url(Configure::read('Config.URL'));?>data/CouponOffer/<?php echo $data['CouponCode']['code']; ?>.jpg');">Please print out this coupon to redeem offer.</a> 

回答

0

試試這個:

<script type="text/javascript"> 
// Popup window code 
function newPopup(url){ 
popupWindow = window.open(url,'popUpWindow',(height=600,width=800,left=10,top=10,resizable=1,scrollbars=1,toolbar=0,menubar=0,directories=0,status=0)); 
} 
</script> 

<a href="javascript:newPopup('<?php echo $this->Html->url(Configure::read('Config.URL'));?>data/CouponOffer/<?php echo $data['CouponCode']['code']; ?>.jpg');">Please print out this coupon to redeem offer.</a> 
+0

喜...它不工作...在發送郵件服務器禁用所有的JavaScript的.. – Ketaki 2012-08-17 08:04:15

相關問題