This last week I've been trying to use ajax on pages so that everything is from http://host/app.
It seems that full mvc works when you use http://host/app/controller/default/view, but if you have http://host/app/ and then use: ajax('/app/controller/view',[],'register-data') that only the controller information is return. What I would like is when ajax() is call that the data from the view is returned, i.e. the html from the view. for instance say I have: def profile(): student=db(db.student.sid==user_id).select() if (student): form=crud.update(db.student,student[0],next=URL(r=request)) else: form=crud.create(db.student,next=URL(r=request)) if form.errors: response.flash="There was an error submitting the form! Please check for any errors below the fields." return dict(form=form,response=response) if I go to http://host/app/default/profile (meaning there is "def profile" in default.py and profile.html in default/profile.html) this will work fine. But if I load the page http://host/app then use ajax('/app/default/profile', [], 'adiv') then the div is filled with python object, where as if def profile (): return "html" will return proper info to adiv. Why is this? It seems like the view is skipped with ajax() js. thx, -wes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

