Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
WEBMASTER'S TOOLKIT
Dynamically generated JavaScript libraries
By Jeffrey R. Burrows

JavaScript may not have had the media attention that Java has had for the past five years, but it's done more than its glorious namesake to revolutionize Web page design. JavaScript is the glue that holds many Web sites together, especially the user input forms necessary for e-commerce. For Notes developers, its pervasiveness in R5 means an alternative to some of LotusScript's dead-ends and a common development method for Notes and Web clients.

The good news for script developers is that Microsoft's dalliance with VBScript, and its proprietary JScript flavor of JavaScript have given way to a new cross-platform standard called ECMAscript.

The bad news is that different versions of JavaScript proliferate. What's worse, since the interface between script and the browser -- the document object model -- can differ greatly between browsers, developing a Web page that will operate for any browser, or even any recent browser (forgetting Lynx, Cello and Mosaic users), is a real challenge for Web developers.

The challenge
With the growing reliance on JavaScript comes a need to manage the code, cope with browser incompatibilities, protect valuable code from unauthorized copying, and reuse handy functions in other Web pages.

The simplest method of delivering script functions to browsers is to include it in the Web page itself. The HTML tags <SCRIPT> and </SCRIPT> surround the functions, which can then be called in, for example, on click events. This is easy to grasp, but means the whole world can see your code and when you change a function, every Web page with that function must be manually updated. Furthermore, the functions either have to do all the work of adapting to different browsers, or depend on a particular Web browser and model.

Static script libraries
To overcome some of these problems, Netscape Navigator and Internet Explorer (in their 3.x incarnations) introduced the concept of script libraries. Instead of placing the script functions between <SCRIPT> and </SCRIPT> tags on the Web page itself, the code is contained in an entirely separate file, which is loaded by a SRC parameter on the <SCRIPT> tag, like this:

<SCRIPT SRC="../js/validate_library.js"></SCRIPT>

The SRC parameter could refer to a local file on the Web server, as above, or be an absolute URL to a library on another server entirely. For Domino programmers, this URL could refer to a page element (for R5) or a Notes document in a view (for R4) containing script code. The library itself is static, but can be reused in its entirety between Web pages, and centrally updated. Multiple libraries can be used on the same page using multiple <SCRIPT SRC> tags.


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Internet Technologies > JavaScript (13 articles)
   Sorting your Domino views with JavaScript
   Give your Domino views life with DHTML
   Using dynamically generated HTML to thwart spam email address harvesting
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login