I have a table and each row has the \'onclick\' configured to call a js function - this part works. I would like the function to issue an ajax request to a method that I can
Ok, so I managed to implement what I need, with all the ways suggested by BalusC, with
My form was in the wrong place - it was placed within the 'table':
...
Whereas it works for non-Ajax, id doesn't work for Ajax requests. Moving it right below the table caused the requests to be submitted.
The panel that I wanted to render was rendered='false' initially, which caused the HTML markup not to be output in the first place. When the Ajax call returned, it couldn't find an element with the id I wanted to render, and resulted in error dialogs or nothing at all (depending on the method). The solution was to use a wrapper div with the id in question that was always rendered, and use conditional rendering only within that div. So, instead of:
...
I needed to do this:
...
Thanks for all the help. I will leave the post by BalusC as the correct one as it was really correct, with my own errors influencing the whole thing.