HTML
  Home arrow HTML arrow Setting the Features of Web Page Dialog Bo...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Setting the Features of Web Page Dialog Boxes
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-01-05

    Table of Contents:
  • Setting the Features of Web Page Dialog Boxes
  • Size and Position
  • Sending Content to the Dialog Box
  • Giving it Body Elements

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Setting the Features of Web Page Dialog Boxes


    (Page 1 of 4 )

    In this second part of a five-part series on producing web page dialog boxes, you'll learn how to set the text in the status bar of a window, control the size and position of a dialog box, and more. We'll also touch on the content of the dialog box, and how to make it carry out specific tasks when it closes.

    Setting the Text in the Status Bar of a Window

    Here I want to show you how to set the text in the status bar of the dialog box. The status bar can only take a string. If the window of the following code is opened, a dialog box (window) will be open immediately after because of the onload event. The status bar will display the phrase, “This is text for the status bar.”


    <html>

    <head>

    <script type="text/javascript">

    function openWindow()

    {

    myWindow = window.open("","","menubar=no,toolbar=no,status=yes","");

    myWindow.status = "This is text for the status bar.";

    }

    </script>

    </head>

    <body onload="openWindow()">

    <!-- the body elements of the main window go here -->

    </body>

    </html>


    The statement window.open() returns a reference to the new window (dialog box) it has opened. If you need this reference, you can assign an identifier to it as follows:


    myWindow = window.open();


    Here the word "window" (without quotes in the code) is the object of the current window (web page), while myWindow is the reference of the newly opened window, returned by the statement “window.open().”

    If you do not need the reference, simply do not assign it to an identifier, as follows:


    window.open()


    Do not forget that the open() method takes arguments.

    To have text in the newly opened window, type the following into the parent window:


    myWindow.status = "This is text for the status bar.";


    Here, status is an attribute, which takes a string as a value. The above statement is typed in the parent window to take effect in the child (opened) window. The equivalent statement to be typed into the child window is:


    window.status = "This is text for the status bar.";


    Remember, that window is the object of the current web page (which has the statement).

    As I said in the previous part, for simplicity, we shall not use the status bar in this series.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP
    - Background Images for a Menu for All Browsers
    - React and ToChoose Functions for a Menu for ...
    - Fast FAQ Session with ACP
    - Functions for a Menu for All Browsers
    - Browser Compatibility Modifications for a We...
    - Building a Drop-Down Menu with Nested HTML L...
    - Table Attributes for a Menu for all Browsers
    - Modifying a Web Page Calendar
    - Styling Elements of Nested HTML Lists
    - Configuring Tables for a Menu for All Browse...
    - Showing a Full Year with a Web Page Calendar
    - Designing with Nested HTML Lists







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT