[pmwiki-users] newwin question

The Editor editor at fast.st
Sun Nov 19 07:53:11 CST 2006


Wow, thanks Hans!  I greatly appreciate it and will give it a try!
This should be a recipe...

Cheers,
Caveman


On 11/19/06, Hans <design5 at softflow.co.uk> wrote:
> Sunday, November 19, 2006, 11:07:22 AM, The wrote:
>
> > Is there any way to open a new window and predefine the size of the window?
>
> %newwin%[[ ..link..]] will open the link in a new window, but does not
> size it. Only javascriopt can force a window to open a required size.
> Perhaps this %popwin% markup may help:
>
> ## %popwin%
> $HTMLHeaderFmt[] = "
> <script language='javascript' type='text/javascript'><!--
>   function popWin(url) {
>      newwindow=window.open(url,'name','height=300,width=400');
>      if (window.focus) {newwindow.focus()}
>      return false;
>  } // -->
> </script> \n";
> $LinkPopupFmt = "<a href='\$LinkUrl' onclick=\"return popWin('\$LinkUrl')\">\$LinkText</a>";
> Markup('[[popup:','<[[','/\\[\\[popup:(.*?)\\]\\]/e',
>  "Keep(MakeLink(\$pagename,PSS('$1'),NULL,'',\$GLOBALS['LinkPopupFmt']),'L')");
> Markup('%popwin%','<[[','/%popwin%\\[\\[(.*?)\\]\\]/e',
>  "Keep(MakeLink(\$pagename,PSS('$1'),NULL,'',\$GLOBALS['LinkPopupFmt']),'L')");
>
> you can use either %popwin%[[link]]
> or [[popup:link]] syntax.
> Size is determined in the function.
>
>
> Hans
>
>




More information about the pmwiki-users mailing list