spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

JavaScript Tip of the Week for May 20, 1996: How do I make windows?

When you create a window using JavaScript, what you are actually doing is just opening antother browser window. You can set options such as height, width, and whether or not the window will have a status bar or toolbar. In the example below, the window is 350 x 400 pixels in size, the URL of the window is test.html, and all other options, besides scrollbars, are set to no.
    msgWindow=window.open("test.html",
                          "NameofWindow",
                          "toolbar=no,
                           width=350,
                           height=400,
                           directories=no,
                           status=no,
                           scrollbars=yes,
                           resize=no,
                           menubar=no")

To see what this window would look like, press this button:

The HTML file test.html simply said "This is a window created with JavaScript." If you wanted an image in the window, however, you would have to include an absolute reference to the image. This means that if you had a file in your directory called photo.gif, and your homepage was located at "http://www.domain.com/~mypage", the SRC of the IMG tag would have to be "http://www.domain.com/~mypage/photo.gif".

There are many other things that can be done with windows. You can write information to them, such as form data, and you can use them as remotes to navigate around a site. I'm sure there are about a million other ideas for using them, but I'm not going to go over all of them this week. Source


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger