I'm trying to substitute Mako for Myghty on-the-fly as I work my way through
some Pylons tutorials. I'm having trouble with the AJAX tutorial:
http://docs.pythonweb.org/display/pylonscookbook/Getting+started+with+AJAX
I created the project and the ping controller, modified it and verified that
the /ping and /ping/pong URLs worked as expected (changing ping.myt to
ping.mako and setting Mako as the template_engine).
I updated templates/autohandler to this:
<html>
<head>
<title> Amazing ping controller! </title>
${h.javascript_include_tag(builtins=True)}
</head>
<body>
${m.call_next()}
</body>
<hr>
(C) Copyright fancy web2.0 corp.
</html>
and changed ping.mako to
Hello, welcome to the wonderful
${h.link_to_remote("ping!", dict(update="pongbox",
url=h.url_for(action='pong'),
complete=h.visual_effect('Highlight', "pongbox", duration=1)))}
controller!
<div id="pongbox"></div>
The "ping!" link is highlighted, however nothing happens. The generated
source suggests my autohandler isn't getting executed:
Hello, welcome to the wonderful
<a href="#" onclick="new Ajax.Updater('pongbox', '/ping/pong',
{asynchronous:true, evalScripts:true, onComplete:function(request){new
Effect.Highlight("pongbox",{duration:1});}}); return false;">ping!</a>
controller!
<div id="pongbox"></div>
What am I missing?
Thx,
--
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---