On your running web app copy and paste the url that is generated to
jquery and just see if you can hit it directly..  If you are
successful you'll see the javascript source code.

On 7/28/07, Chinchih <[EMAIL PROTECTED]> wrote:
> I have a question about how the <include-script> tag in script templates is 
> used
> to include 3rd-party javascript libraries? According to Tapestry 4.x online 
> User
> Guide, the required "resource-path" attribute specifies "The path to the 
> script
> within the classpath."
>
> I tagged onto the "ConfirmDelete" example in ch.10 of "Enjoying Web Deveopment
> with Tapestry, 3ed" and added the following line in Confirm.script, just below
> <script>:
>
> <include-script resource-path="js/jquery-latest.pack.js"/>
>
> And inside the <body> block, I used a jQuery function just for testing. After
> deploying the example, "view source" revealed that Tapestry had generated the
> following:
>
> <body id="Body">
> <script type="text/javascript"
> src="/ConfirmDelete/WEB-INF/js/jquery-latest.pack.js"></script>
> <script type="text/javascript"><!--
> function getConfirmation() {
> return confirm("Are you sure?");
> }
> $(function(){
> $('button').bind('click', getConfirmation);
> });
> // --></script>
> ...
>
> But on page load I'm getting an error in Firebug which indicated that the page
> couldn't reference the jquery library. I have tried to put
> "jquery-latest.pack.js" under WEB-INF/js inside the war file, but that didn't
> work. Then I tried to create a "jslib.jar", which contains
> js/jquery-latest.pack.js and put it under WEB-INF/lib. That didn't work, 
> either.
> Could someone please kindly offer some hint?
>
> Thanks,
> Chinchih
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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

Reply via email to