views:

31

answers:

0

So I have in index.py:

class Test:
    @cherrypy.expose
    def index(self):
        return mylookup.get_template('test.html').render(item="<div id='blah'>test</div>")

And in test.html:

<script>
window.addEvent('domready', function() {
  $('blah').addEvent('click', function() {
      alert('success');
  });
});
</script>

When clicking on that element nothing happens. Any ideas?

% if item: ${item} % endif