> > <script> > $(document).ready(function() { > $("#dialog-message").dialog({ > modal: true, > buttons: { > Ok: function() { > $( this ).dialog( "close" ); > {{redirect(URL(''ShowData''))}} > } > } > }); > }); > </script> >
This is all a bit hard to follow, and I'm not sure if this is your only problem, but above it appears you are attempting to call a Python function (i.e., "redirect") from within Javascript, which is not how templates work. The Python code inside templates is all executed *before* the page is ever sent to the browser, so the above redirect will happen on the server before that page even gets to the browser. If you want to do a redirect via Javascript, do something like: window.location = '{{=URL('ShowData')}}'; Also, probably no reason to bother closing the dialog if you are then immediately doing a redirect. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.