Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-17 Thread Ron Chatterjee
If you don't want to use the nested load, you can also do this: form = SQLFORM(db.mytable); dialog = modal_wrapper(form, _id='*cont_id*', header='Header', footer='footer') Works just fine. On Friday, February 12, 2016 at 4:40:09 PM UTC-5, billmac...@gmail.com wrote: > > I got to tell you...th

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
I got to tell you...this is way more fun than Django. In django all I am worried using that is the framework and url redirect. Here, the least thing to worry about is framework and I can focus more on the development and logic! Add such a helpful community. Thank you for all your help! On Frid

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
Look at that! request.args(0) '1' Thank you Val. This is great. On Friday, February 12, 2016 at 4:25:18 PM UTC-5, billmac...@gmail.com wrote: > > My bad. I forgot the my_util.py > > On Friday, February 12, 2016 at 4:10:00 PM UTC-5, Val K wrote: >> >> it's easy: >> 1. Place modal_wrapper() func

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
y", line 12, in modal_wrapper close_cross = BUTTON(SPAN(XML('×'), **{'_aria-hidden':"true"}),_type="button", _class="close",data={'dismiss':"modal"},**{'_aria-label':"Close"}) NameError: global name 'BUTTON' is not defined How do I get the BUTTON to work in my_util? O n Friday, Februar

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
My bad. I forgot the my_util.py On Friday, February 12, 2016 at 4:10:00 PM UTC-5, Val K wrote: > > it's easy: > 1. Place modal_wrapper() function in your_web2py_app/modUles named > 'my_util.py' (just for example) - you have to import html-helpers in it: > > from gluon.html import * > > 2. In

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
You got it to work? Because I get this: default/main_page.html", line 83, in NameError: name 'modal_wrapper' is not defined *Controller is now:* def main_page(): main_pg=DIV('hello world') #m_cont = LOAD(f='modal_content.load', ajax=True, ajax_trap=True ) #dialog = modal_wrapper

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Валерий Кучеров
it's easy: 1. Place modal_wrapper() function in your_web2py_app/modUles named 'my_util.py' (just for example) - you have to import html-helpers in it: from gluon.html import * 2. In view place: ... {{=BUTTON( 'Apply',_type="button",_class = "btn btn-default",_onclick="$('#cont_id').modal('

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
What I mean by passing argument from the view to the controller is this (let us consider in my view): (1) Apply (2) Apply In the above (1) is calling that URL with an argument id. (2) is a button, when I click on that, it goes to the controller function my_controler_def, and in my_controler

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Валерий Кучеров
OK, but what do you mean under "pass that argument from my view" ? view is processed and rendered to html page at server side, JS runs only on the client side. so, if you can pass arg from veiw (i.e. arg is defined on server side), also you can pass it in main_page(): def main_page():