On Tue, Aug 10, 2010 at 11:55:11AM -0400, James McManus wrote:
> I'm using pylons, and want to create a mako template that has a javascript
> function with mako script in it. Something like:
> 
> <script type="text/javascript">
>      $(window).ready(function(){
>        % for image in images:
>           $("${imagen}").draggable({helper:'original', handle:'.drag'});
>        % endfor

I tried your code almost exactly (there's no variable ${imagen}, I
assume you meant ${image} or ${image|n}), and it worked.

> Is this possible? I get an error, telling me endfor is undefined, with the
> above script.

Something else must be wrong.

Marius Gedminas
-- 
Critical sections are Windows's lightweight alternative to mutexes, thus
cleverly getting more use out of a previously well-defined phrase by using it
to mean something related to but slightly different from the earlier general
understanding
        -- Verity Stob

Attachment: signature.asc
Description: Digital signature

Reply via email to