SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1897 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

To complete
this task, you use the initializeUI() function. For the Set Layer Z Index action, all the AP elements
in the current page must be displayed in the drop-down list. To display the AP elements in this way,
the initializeUI() function includes a number of specialized functions:
function initializeUI() {
var niceNamesArray;
//Get all the layers available including parent frames
//Then turn those objects references into nice names
niceNamesArray = niceNames(getAllObjectRefs(???NS 4.0???,???LAYER???),TYPE_Layer);
//Populate the select element
populateSelect(???LAYER_LIST???,niceNamesArray);
//Set focus on textbox
findObject(???Z-INDEX???).focus();
//Set insertion point into textbox
findObject(???Z-INDEX???).select();
}
Massimo combines Adobe functions and his own to initialize the dialog box. The Adobe-designed
niceNames() function changes JavaScript object references such as document.layers[???onLayer??™]
.document.theForm to a more readable format such as form ???theForm??? in layer ???onLayer???. The
result of the niceNames() function then is used to fill a drop-down list via Massimo??™s own
populateSelect() function, found in the DW_UI.js file included in our opening step. The remaining
two lines that start with the findObject() function are used to place the user??™s cursor in the text field
when the dialog box opens??”a nice touch that demonstrates Massimo??™s professionalism.


Pages:
1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909