The ['id'] middle arg of the ajax function works only with forms, and it
looks for the name attribute in form inputs for check its val().

your code needs to be something like this:


{{extend 'layout.html'}}

*<script>
$(document).ready(function () {
     $('.row').click(funtion(){*
*         ** ajax('echo?id=' + $(this).attr('id'), [], ':eval')** *
*     });
});
</script>*

<table>
    <tr class="row" id="1">
        <td>Hello</td><td>World</td>
    </tr>
    <tr class="row" id="2">
        <td>Row 2</td><td>New world</td>
    </tr>
</table>

<div id="target"></div>

And the following is my controller:

def one():
    return dict()

def echo():
    return "jQuery('#target').html(%s);" % request.vars.id


-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to