Re: Dynamic Scripting

by Ben Ocean <lists(at)TheWebsons.com>

 Date:  Tue, 23 Oct 2001 06:02:37 -0700
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
At 10:04 AM 10/23/01 +0000, you wrote:
>>Why won't this javascript work? (The <dtml> stuff is a variable I call 
>>and renders just fine, thank you.)
>>
>><span class="top"><img src="images/top"
>>width="javascript:'Math.round(1008*<dtml-var size>)'"
>>height="javascript:'Math.round(82*<dtml-var size>)'" ></span>
>
>Because you cannot call JavaScript in a simple attribute.
>
>I assume this is server side code, calculate the correct width and height 
>on the server
>
><span etc><img width=<% int(1008*<dtml-var size> %>"

Thank you, Peter-Paul. I figured that was the case.
BenO
P.S. For those who wondered, the above script is written on a platform 
called Zope <zope.org> The images have no extensions and the <dtml> tags 
are native to the platform: they will not render without being defined 
within the context of the platform.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA