Suggest includes Suggest.script which contains

<script>
   <include-script resource-path="/scriptaculous-1.7.1/prototype.js" />
   <include-script resource-path="/scriptaculous-1.7.1/effects.js" />
   <include-script resource-path="/scriptaculous-1.7.1/controls.js" />
...
</script>

So, you could create you own Scriptaculous.script with the above contents
and include it in any page that you want using:
<span jwcid="@Script" script="Scriptaculous.script"/>


Jim Roycroft wrote:
Using 4.1.3, I would like to make use of the "Effect" features provided by
Scriptaculous... for example:

<div onclick="new Effect.SwitchOff(this)">
    Click here to make this text disappear
</div>

If I put that code in a regular Tapestry page, nothing happens (because the
required javascript files are not included), however if I add the "Suggest"
component to the page, it works just fine.

How does the suggest component get Tapestry to automatically include the
appropriate prototype+scriptaculous scripts that it requires? How can I
specify the scripts I need for a custom component?

Or in other words (I think)... how do I do this with Scriptaculous? :
dojo.require("some.dojo.feature")

Thanks,
Jim

--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to