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

Chapter 7. 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 7.9 is a fairly simple example; in this page you'll create a new HTML page, then increment a loop that adds 100 lines of text to the page (Figure 7.11).

Script 7.9. You can create new HTML pages entirely under scripted control



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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