This comprehensive course will make you a Release 6 expert in a mere 2 1/2 days. Easy, convenient and cost-effective, it will thoroughly prepare you for the Notes Domino 6 Application Development Update Exam required to achieve Notes Domino 6 CLP status. Click here for more information on TLCC's Notes Domino 6 Application Development Update course. To learn more about how to use JavaScript in Notes Domino 6 check out TLCC's JavaScript in Notes Domino 6 course. Click here for more information on TLCC's JavaScript in Notes Domino 6 course.
To understand the demonstration let's first look at the design of the form. On the form there are two layers, Personal_Layer and Comments_Layer positioned on top of one another. You can use the Layer Tree tool in Domino Designer to view the two layers.
Each layer has a button, [Enter Comments] and [Enter Personal Information] , that uses JavaScript to control the visibility of the layer. By changing the visibility of one layer from hidden to visible you can get the effect of dynamic interfaces without having to reload the page. Below are the DIV tags if you do a View Source of the HTML generated from the form:
For example, to specify the Personal_Layer layer object use the following code:
Now change the visibility attribute for this layer. Since the visibility attribute is a property of the CSS attributes of the DIV tag, reference the style attribute of the layer object. For example, to hide a layer use the following code:
In the demonstration the button code modifies the visibility of the current layer and the layer that you want to display: