Hi,
If you are submitting your form via ajax then you can use eval to call a JS
function.
You can check out the syntax here :
http://web2py.com/books/default/chapter/29/11#Eval-target
create a JS function
showDialog(){
// write code here
}
in the controller write the return statement as :
return "showDialog()"
Hope it helps !
On Tuesday, March 27, 2012 6:01:14 PM UTC+5:30, José L. wrote:
>
> Hi, I'm having problems trying to show a modal window after the user
> submits correctly a form.
> I've tried to do it with:
>
> def index():
> ....
> if form.accepts(request.vars):
> response.js='$( "#dialog-message" ).dialog({ modal: true });'
> ...
>
> being #dialog-message a div in the same index.html page, but response.js
> doesn't do anything, and it seems to work only inside componentes.
>
> Any idea to get this funcionality working?
> Thanks.
>