On 3 mai, 23:23, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On May 3, 2007, at 3:00 PM, Michael G. Noll wrote:
>
>
>
>
>
> > Here's the snippet of my Mako template to output the required
> > JavaScript via WebHelpers:
>
> > =============== snipp ================
> > ${h.link_to_function("?",
> > h.update_element_function("dom_element_to_be_updated", content="foo
> > bar"))}
> > =============== snipp ================
>
> > The resulting output of the template is:
>
> > =============== snipp ================
> > <a href="#" onclick="$('dom_element_to_be_updated').innerHTML = 'foo
> > bar';
> > ; return false;">?</a>
> > =============== snipp ================
> > (as a side note, there is a line break here between the first and the
> > second line)
>
> this doesnt seem like a Mako issue.  that youre getting <a
> href="#"... means that the outermost ${} tag is definitely getting
> parsed as an expression substitution and h.link_to_function is
> working, and that the resulting expression figures out the "content"
> argument means h.update_element_function is doing something too.  its
> just spitting out a weird $(<expresion>) type of syntax for some reason.

The reason is probably here:
http://www.prototypejs.org/api/utility#method-$

I guess the OP's problem comes from not having called
h.javascript_include_tag('prototype') before...
http://pylonshq.com/WebHelpers/module-webhelpers.rails.asset_tag.html#javascript_include_tag

HTH


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to