Integrating lightbox2 Api in agile platform.

Integrating lightbox2 Api in agile platform.

  
Please i would like to know how to make use of  this library which contains jquery scripts folder,css and image folders in agile platform(most of the videos are being displayed using dreamweaver cs4).Visit http://www.huddletogether.com/projects/lightbox2/ for further details.This is a small but powerful package which enables you to manipulate image displays using javascript to diplay amazing effects.Pls any guidance regarding importing and using this framework will be appreciated.
Tmlewin

Yes you can easily implement lightbox, jquery or any other javascript framework, to your outsystems application: 

TIP:
Add the Javascript to your webscreen
-You can add one or more javascript to your webscreen header using the HttpRequestHandler:AddJavascriptTag action. 
-Alternatively you can add javascript using an unescaped expression.

Add the css stylesheet to your webscreen
-You can add one or more stylesheets to your webscreen header using the httpRequestHandler:AddStylesheetTag action
-Alternatively you can add stylesheet in outsystems studio.


It's easy.
Done it previously
Hi Tmlewin,

As both Robert and Joost mentioned, it can easily be done.

The best way to do it, probably, would be for you to:

1 - Add each file one by one as Resources to your eSpace
2 - Change the Deploy action in each to "Deploy to Target Directory"
3 - Set the target directory similar to the original structure in the zip file - i.e. images, js, css
4 - Follow Robert's tips on:

TIP:
Add the Javascript to your webscreen
-You can add one or more javascript to your webscreen header using the HttpRequestHandler:AddJavascriptTag action. 
-Alternatively you can add javascript using an unescaped expression.

Add the css stylesheet to your webscreen
-You can add one or more stylesheets to your webscreen header using the httpRequestHandler:AddStylesheetTag action
-Alternatively you can add stylesheet in outsystems studio.


I hope this helps!

Let us know how it goes.

Regards,

Paulo Tavares
Hi paulo ,
i followed your instructions but i encountered an error when i was adding the lightbox references to the jquery script at the htttprequesthandler.addjavascripttag.attached is copy of snapshot.
Hi Tmlewin,

In that case, it's a simple matter of excaping the quotes in the text. The escaping of strings is the same as VB in terms of syntax. You need to use double-quotes to escape double-quotes, in a string.  :) So, for instance, your text should be

"<script type=""text/javascript"" src=...

I hope this helps! If you still can't get it to work, do let us know and paste here that code and we'll work it in for you. This thread covers the same problem in a different user's case.

Regards, and have a great weekend!

Paulo Tavares
here is a copy of the code

"<script type=""text/javascript"" src="js/prototype.js"></script>"
"<script type=""text/javascript"" src="js/scriptaculous.js?load=effects,builder"></script>"
"<script type=""text/javascript"" src="js/lightbox.js"></script>"


and it threw this error Invalid Expression 'unexpected 'js' in expression.I think i made a mistake in placing my quotes ""




Hi Tmlewin,

Yes, you just need to double escape all quotes:
"<script type=""text/javascript"" src=""js/prototype.js""></script>
<script type=""text/javascript"" src=""jsscriptaculous.js?load=effects,builder""></script>
<script type=""text/javascript"" src=""js/lightbox.js""></script>"

Cheers,
Tiago Simões
The best way to incorporate JS and CSS is to use the tips robert gave

Add the Javascript/CSS to your webscreen: you can add one or more javascript/css to your webscreen header (in the preparation) using the HttpRequestHandler:AddJavascriptTag action. 
That way you dan't have to bother about the quotes.

Also use the webscreen javascript property if the javascript on the page can be seperated.
That way the quotes don't stand in your way and it creates a separate JS file for the page.