In my opinion the correct sentence will be:<br><br><a tal:attributes="href python: here.a_script(x)" /><br><br>But they are trying to say you that structure don't do anything here because an anchor expect or a URL or a javascript
<br><br>You are trying to put an html code into an anchor but this don't work on HTML or xHTML<br><br>If you want to execute the scritp when the user clicks on the anchor you need to use something like:<br><br><a tal:attributes="href <the url of the script>" /> -> <a tal:attributes="href string:${
here.a_script/absolute_url}?doc=${x}" /><br><br>and when the user clicks the anchor the script will be executed<br><br>can you find a reference help about HTML o xHTML with an anchor like this:<br><br><a href="<html><body>your page here</body></html>" />
<br><br>no, isn't it? then structure don't do nothing here...<br><br><div><span class="gmail_quote">2007/8/15, <a href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</a> <<a href="mailto:tonylabarbara@aol.com">
tonylabarbara@aol.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I tried this:</div>
<a tal:attributes="href string:${here/a_script}?doc=${x}">
<div>but got this error:<br>
<strong>Error Type: TypeError<br>
Error Value: a_script() takes exactly 1 argument (0 given)</strong><br>
Next, I rewrote the script to put in a try statement for the variable, to test that, but before I even got to test I looked at the rendered code from the above line and it gave me this:<br>
<<span>a</span><span> href</span>=<span>"&lt;html&gt;&lt;body&gt;nope&lt;/body&gt;&lt;/html&gt;?doc=0"</span>><br>
So it doesn't look like the "string:${..." workaround worked :(<br>
And I don't think I need to URLquote.<br>
TIA,<br>
Tony<span class="q"><br>
<br>
<br>
-----Original Message-----<br>
From: Chris Withers <<a href="mailto:chris@simplistix.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chris@simplistix.co.uk</a>><br>
To: <a href="mailto:tonylabarbara@aol.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tonylabarbara@aol.com</a><br>
Cc: <a href="mailto:lists@zopyx.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">lists@zopyx.com</a>; <a href="mailto:zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
zope@zope.org</a><br>
Sent: Wed, 15 Aug 2007 11:05 am<br>
Subject: Re: [Zope] How Do I "Structure" This?<br>
<br>
</span></div><span class="q">
<div style="margin: 0px; font-size: 12px; color: rgb(0, 0, 0); font-family: Tahoma,Verdana,Arial,Sans-Serif; background-color: rgb(255, 255, 255);">Ah Tony, <br>
<br>
looks like the penny is yet to drop... <br>
<br>
<a href="mailto:tonylabarbara@aol.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tonylabarbara@aol.com</a> wrote: <br>
> Bummer. Well, I'm trying to call a script that will render content to the Web, like this: <br>
> <a tal:attributes="href python:here.a_script(str(x))"> <br>
<br>
My guess is that what you're _really_ trying to do here is: <br>
<br>
<a href="" <br>
tal:attributes="href string:${here/a_script/absolute_url}?avar=${x}"/> <br>
<br>
...but next you'll be wondering how to url quote x. <br>
<br>
I feel we're fighting a loosing battle here... <br>
<br>
Chris <br>
<br>
-- Simplistix - Content Management, Zope & Python Consulting <br>
- <a href="http://www.simplistix.co.uk/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.simplistix.co.uk</a> <br>
</div>
</span><div>
<hr style="margin-top: 10px;"><span class="q">
AOL now offers free email to everyone. Find out more about what's free from AOL at <a href="http://www.aol.com?ncid=AOLAOF00020000000437" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><b>AOL.com
</b></a>.<br>
</span></div>
<br>_______________________________________________<br>Zope maillist - <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Zope@zope.org">Zope@zope.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">
http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev
</a> )<br><br></blockquote></div><br><br clear="all"><br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a>