Yes, you cannot do that, you are mixing javascript (LOAD) with Python. You 
have to make the changes to the view, not the controller.

On Tuesday, September 9, 2014 4:24:27 AM UTC-7, Sarbjit wrote:
>
> I am using the Dialog plugin from http://dev.s-cubism.com/plugin_dialog 
> to display modal dialog form.
>
> My requirement is that whenever the user edits the Grid record, then I 
> should do some validation on the form contents (I'll be using onvalidate 
> callback for my custom form validation).
>
> Once the validation is complete, I want to display the form with some 
> pre-populated fields, if the user accepts this modal form, then I'll run 
> one external script in addition to updation of the grid data. If the user 
> donot submit the form, it should just update the grid record.
>
> *Example*
>
> This is the example usage shown in the plugin doc.
>
> def index():
>     dialog = DIALOG(LOAD(f='inner', ajax=True), title='Test', 
>                     close_button='close', renderstyle=True)
>     return dict(dialog=A('show dialog', _href='#',
>                          _onclick='%s;return false;' %dialog.show()))
>                          
> def inner():
>     return DIV('OK!')
>
> What I'm trying is :- (In onupdate callback) 
>
> def myonupdate(form):
>     print 'update!'
>     dialog1 = DIALOG(LOAD(f='inner', ajax=True), title='Test', 
>                     close_button='close', renderstyle=True)
>     dialog1.show()
>
> *Problem :-*
>
> It doesn't opens the modal form, while in the example on clicking button, 
> a modal form does appears.
>
> Is there any way, I can make this modal form to appear on editing the grid 
> record or I can open a conformer dialog when the user is updating the grid 
> such that I can run the additional external process if the answer is yes.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to