Hi list,
I'm pretty sure that this must be a silly question, but I can't find the way to do it. I basically need to define a javascript function in the header of my page. Specifically I need: <head> ... <script type="text/javascript"> //<![CDATA[ function myFunction() {...} //]]> </script> ... </head> I've tried adding it in the #updateRoot: by doing something like: updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript contents: /javascript code/ but it doesn't work. So, any hints are really appreciated. Thanks in advance, Andrés _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
MyComponent>>script
^'function myfunction () {alert("Hello, World!")};'. Hope this helps, -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Andres Fortier > Sent: Friday, April 18, 2008 12:28 PM > To: Seaside List > Subject: [Seaside] Adding a Javascript function in the head of the page > > Hi list, > I'm pretty sure that this must be a silly > question, but I can't find the way to do it. I > basically need to define a javascript function in the > header of my page. Specifically I need: > > <head> > ... > <script type="text/javascript"> > > //<![CDATA[ > function myFunction() {...} > //]]> > </script> > ... > </head> > > I've tried adding it in the #updateRoot: by doing > something like: > > updateRoot: aHtmlRoot > > super updateRoot: aHtmlRoot. > aHtmlRoot javascript contents: /javascript code/ > > but it doesn't work. So, any hints are really appreciated. > > Thanks in advance, > Andrés > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Andres Fortier-2
Something like
updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript add: /javascript code/ should work. It's not very intuitive, sorry. In recent version of Seaside: updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript with: /javascript code/ should work as well Cheers Philippe 2008/4/18, Andres Fortier <[hidden email]>: > Hi list, > I'm pretty sure that this must be a silly question, but I can't > find the way to do it. I basically need to define a javascript function in > the header of my page. Specifically I need: > > <head> > ... > <script type="text/javascript"> > > //<![CDATA[ > function myFunction() {...} > //]]> > </script> > ... > </head> > > I've tried adding it in the #updateRoot: by doing something like: > > updateRoot: aHtmlRoot > > super updateRoot: aHtmlRoot. > aHtmlRoot javascript contents: /javascript code/ > > but it doesn't work. So, any hints are really appreciated. > > Thanks in advance, > Andrés > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |