I am trying to write a jQuery even that inserts an entry into a table like this:
$('#insertButton').on('click',function(){
{{db.myTable.insert(user_id=auth.user_id, text=myText)}}
});
As a real general example of what I am trying to do. It's located in the block of my The problem is that when the view is loaded the function fires automatically. It does that insert every time the page is loaded. Is there some quirk of web2py that doesn't let you have python code embedded in your jQuery events? Is there a way around this?