I have an object in the javascript which contains id, name pairs which identify entries in my web2py 'projects' table. In the browser, I populate the view with the entries using python
{{=A('+ Create New Project', _href=URL("createProject"))}}
{{for proj in projects:}}
{{=A(proj.name, _href=URL("showImages", vars=dict(projectId=proj.id)))}}
{{pass}}
I used json to pass the dictionary of id, names of the projects from python to javascript and now I need to implement the creation of the list of links in javascript because I need to be able to edit the list with button presses. I can access the object by
for (var id in obj){
//id gives the project id and obj[id] gives the projectname
}
How would I create the list using the name as the text, "showImages" controller as the URL, and the project id as the request variable? Thank you