iain duncan <[EMAIL PROTECTED]> writes: > I have not been able to figure out how to get a javascript function to > fire when a widget with a custom template is rendered/loaded. Can anyone > give me a pointer here? I tried putting onload function in the custom > template but it does not seem to go. I can get stuff to happen by > putting in script tags, but I'm under the impression that is not really > the right way to use the widgets with javascript?
You can put a JSSource in your form class. Then specify that it should be located at the bottom of the page (to guarantee that the widget has its HTML already available) and on this JSSource you can call your function. OR you can change the template of the widget and include the JavaScript directly at it. Or you can fire onload events (be sure to use MochiKit's command for that to avoid IE leaks...). Or ... -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

