Setup jQuery for use with Notes

I’ve seen jQuery setup for use with Domino web applications in several different ways - linking to Google’s jquery libraries, adding jQuery as script library in databases, added jquery library to same server that is hosting the Domino server and etc…

How do most people setup jQuery for use with their Domino web applications?

Derek

Subject: Add in global template

Howdy!

I’ve just started with jQuery, and other then trying for fudge the form’s id tag, it’s been going well!

We have one big huge Notes template that contains jQuery libraries, workflow features, ability for users to admin users for the secondary NAB, views as RSS feeds, and tons more!

Having the jQuery libraries in one template, and inherited by many Notes apps makes it easier to upgrade them. Once a new jQuery feature is added, we add it to one template, and the design task updates all the apps.

Now, if only I can figure out how to use jQuery for validation, then I’m all set! :slight_smile:

Cheers!

Steve in NYC

“It hurts to be on the cutting edge.”

Subject: Setting up Jquery with Notes 8.5

I am trying to use jquery code in my lotes notes but facing problems to access the jquery libraries.

As suggest in ur post, I have tried the following:

Method 1: Include the online link as below in my Form’s HTML head content

“”;

Problem: I jquery code cant find it :frowning: (even simple alerts on dom ready dont work)

Method 2: Copied the code from http://code.jquery.com/jquery-1.6.4.min.js and http://code.jquery.com/jquery-1.6.4.js into my database>Code>Script Libraries.

Problem: On saving the files

jquery

"Save failed, cannot save with syntax error

Line 1

Error in compiling javascript"

jquery.min:

"Save failed, cannot save with syntax error

Line 2

test for equality (==) mistyped as assignment(=)?"

I looked up this problem on the net and found this link:

Which gave the reason for these errors and suggested the method I used next

Method 3:

Included the jQuery files as file resource in my notes database

Problem: I cant figure out how do I refer to these files in my form/subform in which I am trying to use jquery in

Can anyone please give the steps to do the same… I know just the basics of the Domino and totally new to Jquery. But I am learning :slight_smile:

Subject: We put libraries in a database…

We use YUI, but concept is same for jQuery. We load them all in a database and then refer to them in our apps via each Form’s HTML Head Content in the following manner:

yuiPath := “/web/yui270.nsf”;

@NewLine+

“<script src="”+yuiPath+“/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript">” +@NewLine+

“<script src="”+yuiPath+“/build/datasource/datasource-min.js" type="text/javascript">” +@NewLine+

The biggest benefit is that this allows us to easily keep libraries replicated across cluster members.

Subject: Host in server

Jquery and all external libraries are common libraries so we hosted in the server root directory…

So we can use for all applications , where it’s required.

Subject: Thank you…

Thank you. Hosting on the server makes sense to me. Derek