Lotus Training Overview
TDuring this course you will use Domino Designer 8 to add JavaScript to Domino applications that are accessed by browsers. The course covers the basic language elements of JavaScript, how to add scripts using Domino Designer, and how to exploit the various browser and language object event handlers. There is a strong emphasis on the browser object model and how it relates to the Domino object model. The course also touches on how to incorporate Dynamic HTML, Java Applets, LiveConnect, ActiveX controls, and AJAX into web-based applications.
Lotus Training Course goals
In this course, you will learn how to:
This course will teach you how to:
Lotus Training Audience
This course assumes that you have:
thorough knowledge of the Domino Designer 8 development environment, including Form, Page, View, Frameset, and Agent design, as well as how to set properties and set the ACL
This course is part of a series of Domino Designer 8 training courses. Follow these paths to master all aspects of developing applications using Domino Designer:
Domino Designer 8: Basic Notes Applications provides the base knowledge for this additional training:
Client Track
The course takes a task-oriented approach, during which you will work with JavaScript code that will have immediate application to your Domino applications.
Because this course instructs you how JavaScript works with respect to Domino, you will be able to leverage the many JavaScript resources available to you as a developer.
3 days
Language Track. These languages apply to both Notes and browser clients:
Course design
Lotus Training Course duration
Lotus Training Course outline
Topic 1: Browser Objects and JavaScript
Preview of the Domino/browser
exchange
Topic 2: Coding JavaScript
in Domino Designer
Programming challenge
The history of client-side scripting
Brief history of browser object models
Launch browser from Lotus Notes
Browser Object Model (DOM Level 0)
JavaScript vis-a-vis browser objects
Mozillas DOM and JavaScript object Inspector
Domino as a Web server
The Domino
"Web Server"
Third-party Web server
plug-ins
Exercise: Create project
databases
HTML page structure
Topic 3: Basic Language Elements
Code
your own HTML
Other sources of
HTML
Getting JavaScript into the HEAD
tag
Exercise: JavaScript
function
Getting JavaScript onto an HTML
page
Exercise: Create a button
Troubleshooting button problems
JavaScript libraries
JS files on
Pages
JavaScript library
security
Syntax checking
Runtime error reporting
Microsoft
Script Editor
Mozilla JavaScript
Debugger
Commercial debuggers
Home grown debugging
Walkthrough: Basic elements
Topic 4: Branching and
Looping Structures
Simple data types
Built-in
functions
var keyword and variable
scope
Simple dialog boxes
Commented code
Exercise: Dialog
boxes
try/catch statement
throw statement
Custom error
object
Garbage
collection
If structure
Topic 5: Custom Functions
Exercise:
If structure
Boolean operators
Exercise: Boolean operator
Simple
if using ?
Switch
While structure
Do while
structure
For structure
Break
Continue
Exercise: Looping structures
Function statement
Topic 6: JavaScript Objects
Function arguments
How to call a
function
Where to call a function
Return a value from a function
Exercise: Function to test number
Passing argument by value
Recursive functions
Conversion of
@Commands to JavaScript functions
Date object
Topic 7:
Arrays
Browser or
Domino Server time?
Create date
object
Domino-acceptable date
entry
Exercise: Date object
Math object
Number
object
String object
String object parsing methods
Regular expressions
Simple
examples
Valid number
Intermediate example: Replace
Advanced example: Patterns and literals
Exercise: Fix URL function
RegExp
(regular expression) object
Screen
object
Custom objects
forin statement
with
statement
delete operator
Custom object prototyping
Example:
Custom class
Example: Add method to JavaScript
object
Enumerator object
Image object
Array attributes
Topic 8:
Browser Object Model
How to
declare an array
Create array from
@DbColumn
Number of elements
Append elements
Read one
element
Read all elements
Out-of-bound errors
Copy entire
array
Array object methods
Delete element
Find values in an
array
"Multi-dimension" arrays
Associative arrays
Exercise: Parse
URL command string
Parse URL command string
using formula
Unique array
elements
Object Literal
Nested Literals
Browser object hierarchy
Topic 9: Browser Event
Handlers
Browser object browser
Table of
browser objects
Traverse the
hierarchy
Example: Access Form
object
Example: Access Field
object
Chaining object
references
this keyword
self keyword
Help with the Browser
Object Model
Exercise: Accessing a Field
object
Browser object and Domino object
interaction
Example: Form
processing
Browser object to Domino object
limitations
Possible events
Topic 10: Field Access
Event
handler basics
Commonly-coded
events
Walkthrough: Investigate event
handlers
Capture key presses
Example 1: Capture key presses
Example 2: Capture ESC and double-click
Event handler registration
this
keyword
Object event default
actions
Coding the javascript:
pseudo-protocol
Coding javascript: in a
formula
HTML field data type
Topic 11: Field Input Translation and Validation
Text field access
with
statement
JavaScript access to Computed/Hidden
Fields in Edit mode
<INPUT> tag and
Fields
JavaScript access to Computed/Hidden
Fields in Read mode
Parsing a multi-value Field
into an array
<SELECT> field
access
Select an option
Add new option to a select list
Remove option
Radio
Button
Checkbox
Select all check boxes
Exercise:
Accessing fields
Exercise: Searching from a
Page
Rich text values
Field-level help
Topic 12: Form
Validation
Field
translation
Field validation
Test data type
Validate for
number
Test for NaN
Test for "null" and "undefined" and ""
Validate for file attachment name
onblur, alert, and focus interactions
Select field validation
Radio and
check box validation
String format
validation
Date validation with
JavaScript
Handling leap years
Forcing valid date entries
Field
computation
When you must use Server-side input
translation/validation
Example: Server-side
input validation
Date validation via
@Functions
Exercise: Recalc using
JavaScript
Field-level event handler caveats
Topic 13: Window Object
"Object is not defined" error
onsubmit event handler
Keep the
<FORM> tag compact
Conditionally call
form.submit()
Exercise: Form
validation
Hybrid Form
validation
Ensure just one
submission
window.onerror event
handler
Open window using HTML
Topic 14: Frame Object
Open window using JavaScript
Hybrid HTML Link/JavaScript link
Window features
Referring to
windows
Cross-domain script security
restriction
Focus on a window
Print window
Write to
window
Resize, move window
Close a window
Window opener
property
Exercise: Help window
Custom dialog boxes
Simulating
@Picklist using standard window.open
Simulating
@Dialogbox with a modal dialog box
Address book
lookup dialog box
setTimeout
method
window.find
clipboardData object
Frames are windows
Topic 15: Location Object
Frameset basics
Support browsers
that dont support Frames
Example
frameset
Targeting frame content using
HTML
Dynamic frames from
JavaScript
Call a function from another
frame
Exercise: Help frame
Example: On-Form help frame
IFrame
Object
Location is where you are
Topic 16: Browser State
Persistence
Database properties
Location
properties
Location object versus CGI
variable
Set location to the current
database
URL encoding
Setting the location
Replacing the
location
Example: ESC and
Double-click
Refresh/Reload a
window
Working with frame
locations
Redirection
Redirection to user mail
Redirect
to SSL connection
Manual redirection: "Menu
Options"
Menu Option 1: Select with
button
Menu Option 2: Select w/o
button
Exercise: Page chooser
Prevent from being framed
Frame
your pages
Invalid URLs and buffer
overflows
Who is the user?
Topic 17: Dynamic HTML
What is
a cookie?
Privacy issues
Set cookie using META tag
Read
cookie using CGI variable
Weaknesses of
HTTP/HTML methods
Set cookie using
JavaScript
Example: Set cookie
Get cookie using JavaScript
Set
cookie using formula
Parse cookie
values
Delete cookie
Exercise: Default Field values using cookie
Profile documents
Profile
documents and security
Create Profile document
Read from Profile document
Fields
Example: Profile
document
Behaviors and data
persistence
Userdata and IE
security
Example:
Userdata
DOM Level 1 enhancements
Topic 18: JavaScript and Java
Applets
DOM Level 1 hierarchy
Element
nodes
Browsing the node
hierarchy
Mozillas DOM and JavaScript object
Inspector
Instantiate a node
object
Example: Instantiate Subject
Field
Get and set Field value
Set Field style properties
Element
object shortcut
TextNode
objects
Node event handlers
DHTML examples
Example: Change
style sheets on Form load
Example: Change style
sheets on the fly
Example: Reset style on
elements
Example: Hide When
Example: Expand all sections
Example: Disable element
Exercise:
Disable element
Tables
Element positioning
Date
picker
Field input mask behavior
Java and Domino
Topic 19:
Domino Views
Import/embed single file Java applet
Embed applet with parameters
Import/embed multiple file applet with
parameters
Applet parameters
Shared Applet Resource
LiveConnect
Applet access to
JavaScript objects
Date picker Java
applet
Domino applets
Exercise: Editor Java applet
lotus.domino.AppletBase applet
How
the lotus.domino.AppletBase applet works
Domino
Server settings
Client settings
How to embed the lotus.domino.AppletBase applet
Accessing Domino objects via
JavaScript
Java Console
Common errors with
lotus.domino.AppletBase
$$ViewTemplateDefault as redirector
Topic 20: JavaScript and ActiveX
Controls
JavaScript function calls in column formulas
Exercise: JavaScript in column formula
HTML check boxes in Views
Document
processing in applet View
Alphabetic
index
Search from
View
ActiveX and security
Topic 21: Asynchronous
JavaScript and XML
Example 1: Shockwave not scripted
Example 2: Flash - scripted
Example 3: Windows Media Player
Example 4: Calendar control
Example 5: Run methods in embedded Editor
control
AJAX rediscovered
Topic 22: Browser
Compatibility
GET
data from Domino
POST data to
Domino
XMLHttpRequest object
XMLHttpRequest object example
XMLHttpRequest and security
Limit
and control data from view
JavaScript Object
Notation (JSON)
XML document transformation
Other examples of using Domino XML
output
What browsers are being used?
Topic 23: JavaScript
Resources
The issues
Code
strategies
Server-side branching with
@BrowserInfo
@GetHTTPHeader
Client-side browser type/version detection
Detect browser type/version using CGI variable
Hide JavaScript from non-compliant browsers
JavaScript version detection
Client-side object detection
Case
Study: "Layers"
Programmatic access to
"layers"
Cross-browser coding
The problem with either type of browser detection with
JavaScript
JScript reference
ECMAScript-262 reference
Browser
object models (DOM)
JavaScript example
code
DHTML examples
Java applets
ActiveX
controls
AJAX
JavaScript toolkits/function
libraries/frameworks
Domino AJAX
examples
JSON