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

Chapter 10. Using the navigator, locatio... > Using the location Object’s Properti...

Using the location Object’s Properties

Let’s put the location object’s properties to work in an example. In this case, the code will let the user open a new window, navigate to a new URL in the new window (using the browser’s File | Open Web Location menu item), and then click a button in the original window to display the details of the new window’s location object.

In this example, I’ll navigate to the URL we saw earlier: http://www.w3.org/TR/html4/appendix/changes.html#19991224. (I’m choosing this URL because it has a hash part to it.) Usually, browsers won’t let you get the properties of the location object in another window, but you can enable the UniversalBrowserRead privilege in the Netscape Navigator to let you do this, so this script is targeted to that browser:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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