Putting Windows in Their Place
Sometimes you want to open a window in a particular spot on the screen. In this example, you’ll have your choice of opening a small window in any of the four corners of your screen. Like the previous example, we also provide a link to close the child window. The HTML is similar to previous examples, as shown in Script 6.10. As you would expect, each of the links is tagged with its own unique id. The JavaScript, in Script 6.11, builds on Script 6.9.
Script 6.10. Clicking on these links tells JavaScript where you want your window located.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Window ... |
Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.