Hi Tim,

Thanks for the help. I was able to do an easy_install submodal and it
looks like it did install without any problems. I see it in my python
directory/Lib/site-packages folder.

However, in my controller, I tried importing submodal by doing a few
combinations:

import submodal

from submodal import *

from turbogears.widget import submodal


but when I do popupwidget = SubModal() it says SubModal not found.

Any clue as to how I can get ths fixed?

Regards,

Vidya

On Oct 6, 10:28 am, Tim Black <[EMAIL PROTECTED]> wrote:
> Vidya,
>
> I was wrong about the below.
>
>
>
> Tim Black wrote:
> > After installing submodal, the docs in its code (it's only 60 lines of
> > code) give you an example of how to use it:
>
> >     <div>
> >       <script type='text/javascript'>
> >       var callback_test_function = function (returnVal) {
> >           alert('This is a callback!');
> >           alert(returnVal);
> >       }
> >       </script>
> >       <p>SubModal Testing.</p>
> >       <p><a href='http://www.turbogears.org'class='submodal'>
> >          Click Here for a SubModal Window (just using the class is
> > enough ;-))
> >          </a></p>
> >       <p><a href='/tg_widgets/submodal/html/testing.html'
> >          onclick='showPopWin("/tg_widgets/submodal/html/testing.html",
> >                              500, 300, callback_test_function);
> >                   return false;'>
> >          Click Here for a SubModal Window with a CallBack Function</a></p>
> >     </div>
>
> After writing the above, I looked in the TurboGears widget browser 
> (http://localhost:7654/widgets/) and saw the source in the source code
> tab.  What you need to do is put the following call in your controller
> method:
>
> for_widget = SubModal()
>
> You can name 'for_widget' whatever you want.  Pass for_widget out to
> your template in the dictionary returned by the controller method, then
> call ${for_widget.display()} in your template.  If you want to customize
> the contents of the popup window, copy the template = """... code out of
> the widget browser source code tab, paste it in your controller as
> for_widget.template="""..., then modify it to suit your project.
>
> Hope that helps; I'm still new at this myself.
>
> Tim Black


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to