• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Using window and frame Method... > Working with Other Windows

Working with Other Windows

When you open new windows, a window object is returned by the open method. When you have such a window object, you can access the document inside the new window with an expression such as windowObject.document. For example, here’s how to access a text field in another window: windowObject.document.form1.text1.value. In this way, you can work with multiple windows in your code.

Here’s an example where you can open a new window with a button, enter text in a text field in the new window, and click a button (labeled “Get text from new window”) to read the text from the text field, displaying it in the main window:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint