Re: [web2py] Re: Back button with an Ajax LOAD page

2018-03-03 Thread Val K
def router_example(): if request.vars.category_id: # - ajax call return 'Category:%s content' % request.vars.category_id js=""" function ajax_route(){ console.log(window.location.hash); var cat_id= window.location.hash.slice(1); if (cat_id){

Re: [web2py] Re: Back button with an Ajax LOAD page

2018-03-03 Thread Gaël Princivalle
Thanks a lot. Do you have an little example? Il 3 mar 2018 9:01 AM, "Val K" ha scritto: > Hi, I think when page is reloaded history.pushState happens too, so there > are 2 identical URL on the stack after page reloading. > If you want to manage routes by raw JS It is simpler to use url#hash > s

[web2py] Re: Back button with an Ajax LOAD page

2018-03-03 Thread Val K
Hi, I think when page is reloaded history.pushState happens too, so there are 2 identical URL on the stack after page reloading. If you want to manage routes by raw JS It is simpler to use url#hash schema and place args (category_id=2 and so on) after #. In this case it's quite to listen has

[web2py] Re: back button

2017-09-25 Thread Andrea Fae'
Thanks, but why this is working form.components.append(A('Indietro',_class='btn btn-default', _onclick="window.history.back()")) and this is not working? form.append(BUTTON('Indietro', _onclick="window.history.back()")) Il giorno lunedì 11 settembre 2017 01:06:00 UTC+2, Massi

[web2py] Re: back button

2017-09-10 Thread Massimo Di Pierro
You cannot add buttons to a readonly crud form because it has no button row. You can do: form.components.append(A('Back',_onclick="window.history.go('-1')")) On Sunday, 3 September 2017 13:49:31 UTC-5, Andrea Fae' wrote: > > I use in a method this > form=crud.read(db.evento,evento) >

[web2py] Re: back button

2017-09-03 Thread Peter
Hi Andrea, The solution is probably in this post ... https://groups.google.com/forum/#!topic/web2py/z6lOXNgGws8 Hope this helps! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w