[TYPO3-dev] typolink und JSWindow

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sat Feb 10 22:09:52 CET 2007


Steffen Kamper schrieb:
> "Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
> Newsbeitrag 
> news:mailman.1.1171127953.20414.typo3-dev at lists.netfielders.de...
>> Steffen Kamper schrieb:
>>> Hi,
>>>
>>> I use on a page popup-Links with JSWindow. The problem is, that all links 
>>> are referenced to the same window, i need a window for each link.
>> Do you mean "a new window object" (this is what the JS variable vHWin will 
>> hold) or "a new window on my screen" (in this case the window name 
>> FEopenLink is what you're looking for)?
>>
>> Either way you are right, you have to hack to change them.
>>
>> Masi
> 
> Hi Masi,
> 
> ok, i did a little patch and it works perfect. It's based on 4.1RC1 and i 
> posted here:
> http://bugs.typo3.org/view.php?id=4963
> 
> would be nice if you can have a look.

This change is wrong:

-		$target = ' target="FEopenLink"';
+		$target = $target;

Must be:

-		$target = ' target="FEopenLink"';
+		$target = ' target="'.$target.'"';

And I don't see the point in creating random variable names like that. 
If it's random you cannot use it easily from JS.

So I suggest:

$winObj =
  $conf['JSWindow.']['windowVar'] ?
  $conf['JSWindow.']['windowVar'] :
  'vHWin_'.md5(rand());


So we have always a unique name (with rand()), but may use a name of our 
choice.

Masi




More information about the TYPO3-dev mailing list