I think that's a Javascript error, not a web2py error. You probably need to put the URL in quotes, so:
onclick="document.location='{{=URL(r=request,f='atualizar')}}'" Anthony On Monday, September 5, 2011 3:07:11 PM UTC-4, Fabiano Faver wrote: > > I'm tryng to put a button thaat calls a action which in the end will > redirect to another page. but its like the function is not known. > > I've tryed in view: > <INPUT type="button" value="Finalizar" > onclick="{{=URL(r=request,f='atualizar')}}"/> > and: > <INPUT type="button" value="Finalizar" > onclick="document.location={{=URL(r=request,f='atualizar')}}"/> > > in controller: > def atualizar(): > #add some code here later > redirect(URL('index')) > > butthis is what I got: > Uncaught ReferenceError: atualizar is not defined > > I'm still learning web2py and web-programming, so what i'm not seeing here? >