Finding Values and More with Web Page Dialog Boxes
In this conclusion to a five-part series, we'll wrap up our discussion of what you can do with web page dialog boxes. Among other things, we include some tips you'll need to keep in mind when you include web page dialog boxes in your commercial projects.
Finding Values and More with Web Page Dialog Boxes - Easy Way of Creating Descendant Dialog Boxes (Page 2 of 4 )
By the word “descendant” here, I am referring to a child, grandchild, great-grandchild, and so forth, going down the chain. Remember, in part three of this series, I promised that I would show you an easy way of producing dialog boxes.
This is the basic code for the main window:
<html>
<head>
<script type="text/javascript">
//strings, where each string has the content of a dialog box.
Note the argument of the write() function., which is boxStr1. Now, boxStr1 is the variable of a string, whose content is the document (HTML content) of the first dialog box. This string is defined somewhere up in the main window. A function of interest is:
function sendRefBack(theRef)
{
return window.self;
}
This function is called by descendant windows. It sends the reference of the main window to the calling window. The HTML content of each dialog box is in a string, which is in the main window. A descendant dialog box needs a string from the main window to produce its child window. The descendant box uses the reference from the main window to do this.