It seems like the Dojo-library didn't load correctly, because `dom` isn't defined. This is a Javascript-issue though.
\malthe On 10 May 2012 04:19, Fabian Jiménez <fabian...@gmail.com> wrote: > Hello to all, I'm novice in pyramid and chameleon. I need to integrate > zpt templates with Dojo. Next a test code, Javacript console gives the > error: "Uncaught TypeError: Object #<an Object> has no method > 'byId'". > > Thanks in advance. (Sorry, my english) > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http:// > xml.zope.org/namespaces/tal"> > <head> > <meta http-equiv="content-type" content="text/javascript; > charset=utf-8" /> > <title>Test</title> > <script type="text/javascript" src="$ > {request.static_url('mysamples:static/js/dojo/dojo.js')}" > data-dojo-config="async: true"></script> > </head> > <body> > > <h1 class="title">Welcome</h1> > <p>Name: <b tal:replace="banco.ban_name">Name</b></p> > <p>Value: <b tal:replace="banco.ban_sricod">Value</b></p> > <p>Id: <b tal:replace="banco.ban_code">Id</b></p> > > > <h1 id="greeting">Hello world</h1> > <script type="text/javascript"> > require(["dojo/fx", "dojo/dom", "dojo/domReady!"], function(dom, > fx) { > var greeting = dom.byId("greeting"); > greeting.innerHTML += " from Dojo!"; > > fx.slideTo({ > top: 200, > left: 300, > node: greeting > }).play(); > }); > </script> > </body> > </html> > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to pylons-discuss@googlegroups.com. > To unsubscribe from this group, send email to > pylons-discuss+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.