How to make a modal+ajax form "manually"?

140 views
Skip to first unread message

demetrio

unread,
Nov 13, 2010, 6:48:57 AM11/13/10
to web2py-users
Hi everyone,

i'm doing a desktop like iGoogle, with boxes containing information
from different sources (it can be the same application, or other
apps). So I need send my own forms (like "available_boxes", "modify
content preferences" and so)

I saw that the modal plugin is old and now is located inside
plugin_wiki, but I need to do something like that with my own forms.

Is there any way to do it "manually"?

Thanks in advance.

villas

unread,
Nov 13, 2010, 8:15:16 AM11/13/10
to web2py-users
Hi Demetrio

Check out www.web2py.com/book chapter 13 and read about components and
the LOAD function which may help.

-D

Daniel Gonzalez

unread,
Nov 13, 2010, 10:03:01 AM11/13/10
to web...@googlegroups.com
Thank you very much villas!

This can works to me, but in that documentation doesn't says anything
about javascript modal windows.

Does somebody know how to make the jQuery modal windows without using
the plugin PluginMModal()? I will need to create it manually.

demetrio

villas

unread,
Nov 13, 2010, 10:36:45 AM11/13/10
to web2py-users
Hi Demetrio

You don't need to use plugin_wiki to use it. There is a warning that
is 'may' be old, but there's no harm in trying it :)

1. Create a new test app from the Appadmin interface. (e.g. named
TestApp).

2. Download plugin from: http://www.web2py.com/plugins/static/web2py.plugin.mmodal.w2p

3. Install plugin. Open TestApp in the Appadmin, and then go to the
bottom of the page where you can install plugins.

4. Using Appadmin again, open the view file 'default/index.html' and
paste into the file after the first line (which says: {{extend
'layout.html'}} ):

{{a=PluginMModal(title='Hello World',content='give this a
try!',close='close',width=70,height=70)}}
{{=a}}
{{=a.link(H1('SEE MODAL WINDOW'))}}

5. Open the TestApp in your browser and you should see the index.html
page by default.

6. Click on SEE MODAL WINDOW.

Maybe the plugin might be useful for you after all as a starting
point :)
Take a look at the page source to see what it is doing.

-D


On Nov 13, 3:03 pm, Daniel Gonzalez <dgzabal...@gmail.com> wrote:
> Thank you very much villas!
>
> This can works to me, but in that documentation doesn't says anything
> about javascript modal windows.
>
> Does somebody know how to make the jQuery modal windows without using
> the plugin PluginMModal()? I will need to create it manually.
>
> demetrio
>
> El sáb, 13-11-2010 a las 05:15 -0800, villas escribió:
>
> > Hi Demetrio
>
> > Check outwww.web2py.com/bookchapter 13 and read about components and

Daniel Gonzalez

unread,
Nov 13, 2010, 11:20:19 AM11/13/10
to web...@googlegroups.com
Thank you very much villas!

All of you guys are awesome. Everyone in this community :). This is why
I love web2py, an amazing framework, and a more amazing community!

I hope I can be helpful too some day in the near future :)

villas

unread,
Nov 13, 2010, 2:19:43 PM11/13/10
to web2py-users
On Nov 13, 4:20 pm, Daniel Gonzalez <dgzabal...@gmail.com> wrote:
> Thank you very much villas!

LOL many other people have helped me so I'm just passing it down the
line :)
-D

Reply all
Reply to author
Forward
0 new messages