[Seaside] Adding a Javascript function in the head of the page

Boris Popov boris at deepcovelabs.com
Fri Apr 18 20:24:52 UTC 2008


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

boris at deepcovelabs.com

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: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> bounces at lists.squeakfoundation.org] 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
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list