[英]How add window.resizeTo method in Joomla Template?
Sorry for my ignorance and I am new in Joomla but I need to open a new windows and I fixed it, added 抱歉,我的无知和我是Joomla的新朋友,但我需要打开一个新窗口,并进行了修复,
target="_blank"
in my php script but now I would need resize this windows and I am thinking in add the Javascript metod 在我的PHP脚本中,但现在我需要调整此窗口的大小,我在考虑添加Javascript方法
"window.resizeTo"
“ window.resizeTo”
for it, Could anybody advice me about how I should do it? 为此,有人可以建议我该怎么做吗?
Thanks in advance 提前致谢
Castana 卡斯塔纳
If you are looking for a popup 如果您正在寻找一个弹出窗口
try this 尝试这个
window.open('YOUR_PAGE.html','PAGE_NAME','width=200,height=200');
and change your link from 并从更改链接
<a href='YOUR_PAGE.html' target='_blank'/>PAGE_NAME</a>
to 至
<a href='#' onclick="window.open('YOUR_PAGE.html','PAGE_NAME','width=200,height=200'); return false;"/>PAGE_NAME</a>
Edit: 编辑:
For your code, change the your 对于您的代码,更改您的
<a target="_blank" href="<?php echo $item->getPrimaryLink()->getUrl(); ?>">
with 与
<a href='#' onclick="window.open('<?php echo $item->getPrimaryLink()->getUrl(); ?>','PAGE_NAME','width=200,height=200'); return false;">
Hope this helps 希望这可以帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.