Opening Web Page Dialog Boxes with Other Dialog Boxes
It is possible for one dialog box to open another dialog box. In this way, you can have a chain of boxes where the box that opens is the Parent box, and the one opened is the Child box. The main window is the first parent. In this article, the third one in a five-part series, you will learn how to do this and more.
And the following code in the parent script would read the value of the Input Text element from the child window into the variable, name, in the parent window:
var name = myWindow.document.getElementById('I1').value;
Setting and Reading Child HTML TD Content
The method is similar to the one explained above, but instead of the property, value, you have the property, innerHTML.
Assume that you have the following element in the child window:
<table>
<tr>
<td id="TD1">
The cell content
</td>
</tr>
</table>
The following statement in the parent script would set the content of the table cell element to “New Cell Content.”
myWindow.document.getElementById('TD1').innerHTML = "New Cell Content"
And the following code in the parent script would read the content of the table cell element from the child window into a variable (content) in the parent window:
var content = myWindow.document.getElementById ('TD1').innerHTML;