Sorry for my ignorance and I am new in Joomla but I need to open a new windows and I fixed it, added
target="_blank"
in my php script but now I would need resize this windows and I am thinking in add the Javascript metod
"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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.