On Nov 3, 10:58 am, "Miguel Beltran R." <[EMAIL PROTECTED]> wrote:
> Code from Zope
>
> <table>
> <dtml-in somequery>
>   <tr>
>      <td>&dtml-field3;</td>
>      <td><a href="javascipt:
> aFunction(&dtml-field1;,&dtml-field2;)">&dtml-field1;-&dtml-field2;</a></td>
> <--  observe what call aFunction with two params
>   </tr>
> </dtml-in>
> </table>
>
> after render
>
> <table>
>   <tr>
>     <td>Value1</td>
>     <td><a href="javascript: aFtunction(801,1)">801-1</a></td>
>   </tr>
>   <tr>
>     <td>Value5</td>
>     <td><a href="javascript: aFtunction(801,1)">818-1</a></td>
>   </tr>
>   <tr>
>     <td>Value78</td>
>     <td><a href="javascript: aFtunction(801,1)">803-2</a></td>
>   </tr>
> ....
> </table>

Try something along these lines (but strip `href="javascript..."` out
of html):

document.observe('click', function(e) {
  if (e.findElement('td > a')) {
    e.stop();
    aFunction(801, 1);
  }
});

[...]

--
kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to