On Jun 25, 2:30 pm, Chris Curvey <[EMAIL PROTECTED]> wrote:
> (this is not pylons-specific, but I figure someone here will know.)
>
> I would like to be able to use link_to_remote with a dynamic target in
> genshi. For example
>
> <tr py:for="i, up in enumerate(c.unknown_things)">
> <td py:content="up.name" />
>
> <!-- suggestions -->
> <td py:with="div_id = 'suggestions_' + str(i)">
> ${h.link_to_remote('Suggest', dict(url="/suggest",
> update="div_id"))}
> <div id="${div_id}" />
> </td>
>
> <!-- the form for fixing the mappings -->
> </tr>
>
> The idea being that there is a table with one row for each "unknown
> thing", and each row has a cell containing a link for suggestions.
> When you click on the link, the "<div>" in the suggestion cell gets
> populated.
>
> But I can't figure out how to get the "update=" parameter to be
> evaluated dynamically.
>
> Or is there a better strategy to use?
figured it out (of course, as soon as I exposed my ignorance)
${h.link_to_remote('Suggest', dict(url="/suggest",
update=div_id))}
no quotes around "div_id" in the update clause
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---