[ZPT] structure in tal:attributes?

Tino Wildenhain tino@wildenhain.de
Wed, 28 Nov 2001 12:41:32 +0100


Hi,

--On Wednesday, November 28, 2001 00:07:20 -0500 Ron Bickers 
<rbickers-dated-1007528840.33c3f8@logicetc.com> wrote:

>> -----Original Message-----
>> From: Evan Simpson [mailto:evan@zope.com]
>
>> > <a tal:attributes='href
>> > string:javascript:NewWindow("http://domain/${here/mypath}")'>
>> >
>> > Browsers definitely don't like
>> > javascript:NewWindow(&quot;http://domain/coolpath/&quot;)
>>
>> Which browsers?  IE 5.5 and Mozilla 0.9.6 like it just fine, as should
>> any standards-compliant browser.
>
> Ok.  Thanks.  It should've worked just fine.  I think I'll go crawl back
> up in my little hole now.
>
> Note to self: You must define NewWindow in the right place before you can
> use it.

This looks ugly anyway. I would recommend to use
<a href="dummy" target="NewWindow" tal:attributes="href 
string:http://domain/${here/mypath} ;
  onClick string:NewWindow('http://domain/${here/mypath}')">click here or 
let it be</a>

This would leave the site useable even fo the javascript security concerned 
user.

Regards
Tino