If i understand you correctly:

Before Editing :
   Your javascript was embedded in mako. and you had variables set in
javascript
After Editing :
   Your javascript is outside of mako, and you need to set variables

If that is your problem, the solution is to re-architect your
javascript so you can set variables in mako but call functions in a
static file.

static.js
    var MyApp = {
       _variable1 : false ,
       _variable2 : false ,
       doSomething : function(){ },
       doSomthingElse : function(input){ },
       flashMessage : function(message){ alert('message') },
    }

dynamic.mako :
    <script type="text/javascript">
       $(document).ready(function(){
           MyApp._variable1 = ${a};
           MyApp._variable2 = ${b};
           MyApp.doSomething();
           MyApp.doSomethingElse('${c}');
           MyApp.flashMessage('${hello}');
       })
    </script>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to