> So the usual button to redirect to another page I use this > > <button type="button" class="btn btn-primary" > onclick="location.href='{{=URL('gameTime')}}'">Done with my squares</button> > > > What I am trying to do is click a button that does NOT redirect. If I use > a function in defauly.py that has no view in the URL field above, it loads > the generic view as advertised. Grrr. Isn't there just a simple way to > suppress calling the generic view? Just leave the view and retreat into > the controller for a little code parsing? ;) >
First, generic views are disabled by default (though enabled on localhost in the welcome app via a line in db.py). Second, views are only called if your controller action returns a dictionary -- so just don't return a dictionary. <button type="button" class="btn btn-primary" onclick="jQuery.ajax('{{=URL(' gameTime')}}');">Done with my squares</button> def gameTime(): [do something] return 'OK' Anthony -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.