Home arrow HTML arrow Page 2 - Producing Web Page Dialog Boxes
HTML

Producing Web Page Dialog Boxes


These days, many web-based applications are trying to look more like desktop applications. To a limited extent, it works -- until you come to dialog boxes. A desktop application's dialog box works one way, and the dialog boxes you can get from an opened web page work another way; they do not provide the same functions. Fortunately, there's a way to change this. This first part of a five-part article series gets you on your way.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 5
December 29, 2008
TABLE OF CONTENTS:
  1. · Producing Web Page Dialog Boxes
  2. · The Main Method to Use
  3. · The Basic Dialog Box
  4. · Removing or Allowing the Bars

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Producing Web Page Dialog Boxes - The Main Method to Use
(Page 2 of 4 )

The HTML DOM has a window object which has properties and methods to control and open windows. One of these methods has the following syntax:


open(URL,name,specs,replace)


All four parameters of this function are optional. This is the main function (method) we shall use in this series.

If, into a JavaScript, you type without arguments,


window.open()


a new window will open. Because there are no arguments, the opened window comes with a title bar, a menu bar, a tool bar, an address bar and a links bar. You should see “about:blank” as the title and as the content of the address bar. Dialog boxes usually have only the title bar; they do not have the other bars. Later in this series you will see how we get rid of these bars.

The URL Parameter

If you want the new window to be a web page from some server, then type the URL in quotes at this position.

The name Parameter

This is the name of the window. It is the target attribute. From a different dialog box, you can send the web page of some web site to a particular dialog box (window) on your screen; you need this parameter for that. We shall see how to do that.

The specs Parameter

This parameter takes the arguments for some of the presentation (size, position, etc.) aspects of the window. It is a comma-separated list of items. We shall cover this in great detail later. 

The replace Parameter

This is used to decide whether a new window (dialog box) is opened as a new browser window, or if it will fit in the same browser window. We shall not use this much. However, I will comment on this at the end of the series.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials