[Seaside-dev] How to ensure a script appears only once on page?
James Foster
Smalltalk at JGFoster.net
Wed Mar 19 04:57:08 UTC 2008
Sorry, this probably should have gone to the Seaside list, not the
Seaside-dev list!
On Mar 18, 2008, at 7:33 PM, James Foster wrote:
> I'm looking at some of the YUI components, specifically the calendar
> widget, and am struggling with how to create a script. As I
> understand the YUI library, I am supposed to create a Javascript
> that references each of the calendar widgets on my page. The script
> has the general format of (begin, middle, end), where the middle has
> a variable amount of code but the begin and end are fixed. My
> problem is that I might have calendar widgets on various components,
> and the components should not each add the script, because then
> there would be multiple begins and ends.
>
> Now, there might be a work-around for the YUI calendar situation,
> but I have a more general question: Is there some way to hook in to
> the beginning or end of a render process? I've come up with a crude
> approach where each component notifies the session at the beginning
> and end of a render and the session keeps track of the first in and
> then lets it know when it is the last out. Are there any other good
> ideas?
>
> James
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
More information about the seaside-dev
mailing list