Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 2 Hours, 18 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Open a new window will in Soucerer
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Open a new window will in Soucerer
#7499
Open a new window will in Soucerer 1 Year, 11 Months ago  
Hi,
A new window will in Soucerer open. How do I do that?

My soucerer code:
echo "A new Window <a href='$link' target='_blank' onclick="window.open('http://www.google.de','New Window','scrollbars=yes,width=500,height=500');return false;">Link</a>";


A problems hier:
onclick="window.open .......... ;return false;">Link</a>

How should I write that?
Thanks
With best greeting

Julia
julia
Posts: 2
User OfflineClick here to see the profile of this user
Last Edit: 2010/02/26 08:36 By peter.
The administrator has disabled public write access.
 
#7500
Re: Open a new window will in Soucerer 1 Year, 11 Months ago  
Why not just use the target="_blank"? You don't need the onclick for a simple open-to-new-window link:
{source}
<?php
   $link = ...;
   echo 'A new Window <a href="'.$link.'" target="_blank">Link</a>';
?>
{/source}
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#7501
Re: Open a new window will in Soucerer 1 Year, 11 Months ago  
But the reason your code was not working is because you use echo "...";
So you can't put double quotes within the string, unless you escape them, like: echo "...\"...";

But I prefer using single quotes for php echos and javascript and double quotes for html attributes:
{source}
<?php
   $link = 'Link';
   $title = 'New Window';
   $url = 'http://www.google.de';
   echo 'A new Window <a href="'.$url.'" target="_blank"'
      .' onclick="window.open( \''.$url.'\', \''.$title.'\', \'scrollbars=yes,width=500,height=500\' );return false;">'
      .$link.'</a>';
?>
{/source}
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#7502
Re: Open a new window will in Soucerer 1 Year, 11 Months ago  
@ Peter van Westen

Hi,
wonderful to work properly.

Thanks
Sincerely,
Julia
julia
Posts: 2
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Peter van Westen
hosting joomla
MaxCDN | Content Delivery Network | Accelerate your site to the max
Open Source Training | Online Joomla! Training and Support