Question 5) Domino 6 Developing Web Applications

Posted on
Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

Objective : Programming

 

SubObjective : Using JavaScript to Create a Redirect Page

 

Single Answer Multiple Choice

 

Jennifer needs to place an action button on the Inventory form that will log out of the inventory.nsf database and redirect the Web browser user to the company’s home page. Which of the following JavaScript statements could be placed in the action button to accomplish this requirement?

 

 

  1. print http://products.stsware.com/inventory.nsf?redirect=http://www.stsware.com
  2. print http://products.stsware.com/inventory.nsf?logoff&redirect=http://www.stsware.com
  3. window=http://products.stsware.com/inventory.nsf?logout&redirect=http://www.stsware.com
  4. window.location=http://products.stsware.com/inventory.nsf?logout&redirectto=http://www.stsware.com

 

 

 


Answer:
D. window.location=”http://products.stsware.com/inventory.nsf?logout&redirectto=http://www.stsware.com”

Tutorial:
JavaScript is a language that runs on the client. JavaScript code is embedded in the HTML page for processing by a Web browser client. JavaScript can be included for specific events (form events, field events, etc.) and can also be included in the HTML page header by placing the code in the JS Header event.

 

The standard JavaScript object model is supported in Domino. JavaScript objects are mapped to design objects in Domino Designer. For example, the currently open form, page, or view is represented by the JavaScript document object.

 

The “location” object, in the JavaScript object model, is a child of the “window” object representing the currently open page, form, view, etc. It is possible to redirect the Web browser window to another URL, via user action, by adding a control (such as a button) to the form design.

 

The “Logout” parameter in a Domino URL command will cause the cookie that was created for user authentication to expire immediately. This parameter can be coupled with the “RedirectTo” parameter to also redirect the user to another URL.

Reference:
Domino Designer 7 Help – search on: JavaScript object model
Domino Designer 7 Help – search on: Writing JavaScript in the Programmer’s pane

 

These questions are derived from the Self-Test Software Practice Test for 612 – Notes Domino 6 Developing Web Applications.

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: