[ZPT] variables and javascript
Charlie Clark
charlie at begeistert.org
Fri Oct 10 11:34:33 EDT 2003
On 2003-10-10 at 17:23:59 [+0200], Mitch Pirtle wrote:
> Hi list,
>
> Dumb question - I've inherited a site that is using javascript-based
> rollovers for buttons, and have integrated everything in ZPT except for
> the source of the image:
>
> <a onMouseOut="MM_swapImgRestore()"
> tal:attributes="href string:${portal_url};
> onClick string:MM_goToURL('parent','$portal_url');;return
> document.MM_returnValue;
> onMouseOver
> string:MM_swapImage('image_home','','http://10.0.3.120:8080/development_site/media/home_over.gif',1);"><img
> tal:attributes="src string:${portal_url}/media/home.gif" width="26"
> height="30" name="image_home" border="0" alt="Go Home"></a>
>
> The trouble is that I cannot figure out how to reference $portal_url in
> the onMouseOver call. Is there a better way to do this?
Isn't here/portal_url required? Otherwise ignore string and use python
<a tal:attributes="src python:'%s/media/home.gif' %here.portal_url"></a>
Should work assuming portal_url is available.
Charlie
More information about the ZPT
mailing list