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

Chapter 5. Working With Browser Windows > Creating New Pages with JavaScript

Creating New Pages with JavaScript

Previous multiple-window examples in this chapter used more than one HTML file to create the different windows. But there's no need to do that, since you can embed HTML within a script and create a new HTML page on the fly. This is especially useful because you can use the power of JavaScript to fill the new page with dynamic content. Script 5.8 is a fairly simple example; in this page (Figure 5.9), you'll create a new HTML page, then increment a loop that adds 100 lines of text to the page.

Figure 5.9. This parent window is writing into the child window…



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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