Home arrow HTML arrow Page 4 - 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 - Removing or Allowing the Bars
(Page 4 of 4 )

The specs parameter is the one among the four parameters that is used here. Remember that the specs parameter is a comma-separated list of items.

To remove the menu bar, you should type


window.open("","","menubar=no","")


The default specs argument for the menu bar is


“menubar=yes”


That is why you have the menu bar when the specs parameter is “”.

To remove the tool bar, you should type


window.open("","","toolbar=no","")


The default specs argument for the tool bar is


“toolbar=yes”


That is why you have the tool bar when the specs parameter is “”.


To remove the address bar you should type


window.open("","","location=no","")


The default specs argument for the address bar is


“location=yes”


That is why you have the address bar when the specs parameter is “”.


To remove the title bar you should type


window.open("","","titlebar=no","")


The default specs argument for the address bar is


“titlebar=yes”


That is why you the title bar when the specs parameter is “”.

The title bar will always be there by default. I advise you to always allow it.

The open method cannot be used to remove the Links bar. However, when you remove the menu or tool bar, the Links bar normally goes away as well. So we do not have to worry about the removal of a Links bar.

To remove the scroll bars you should type


window.open("","","scrollbars=no","")


The default specs argument for the scrollbars is


“scrollbars=yes”


That is why you have the scrollbars when the specs parameter is “”.


To remove the status bar you should type


window.open("","","status=no","")


The default specs argument for the status bar is


“status=yes”


That is why you have the status bar when the specs parameter is “”. In this series we shall not include the status bar, for simplicity. However, I will show you how to use it below, since you may want this in your own project. Also, if there is an error in your script, the status bar would indicate it, but it wouldn't tell you the exact error.

Specs Arguments for Bars

So far as bars are concerned, you should have as a minimum the following code:


window.open("","","menubar=no,toolbar=no","")


Note how the arguments for the specs parameter are separated by comma(s). IN other words, ‘menubar=no’ is an argument and ‘toolbar=no’ is also an argument. Note how the equal sign is used to choose an option (yes or no).

The Way Browsers Handle Bars

With some browsers, if you remove one bar, all the other bars except the title bar are also removed. With such behavior, if you want a particular bar, you have to include it in the specs parameter.

This is a good place for us to take a break. We will continue in the next part of the series.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials