HTML
  Home arrow HTML arrow Page 2 - 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 - Size and Position


    (Page 2 of 4 )

    Size of the Dialog Box

    Here I will tell you how to give size to the dialog box and how to resize the dialog box.

    To resize, you have to use the specs parameter of the open() method. The following code will produce a window whose width is 400px and whose height is also 400px.


    window.open("","","menubar=no,toolbar=no,width=400,height=400","")


    Note the ‘width=400’ and ‘height=400’ arguments. You do not have to include the “px” unit designation next to the value.

    This size is given when you are opening (creating) the dialog box.

    Position of the Dialog Box

    When you are creating a new dialog box, you can have its position set. The following code will set the new window at the position (25px, 25px) of the screen.


    window.open("","","menubar=no,toolbar=no,width=400,height=400,left=25,top=25","")


    The coordinates for position are the left and top coordinates. That is, the left-top corner of the new window is 25px left from the left edge of the screen and 25px down from the top of the screen.


    Note the ‘left=25’ and ‘top=25’ arguments. You do not have to include the “px” unit designation next to the value.

    Positioning a dialog box can be a good thing, but I usually do not code this. I usually allow the browser to choose a position for me. If you allow the browser to do this for you, it will choose a random position. In practice the random position is usually okay. Occasionally, if the user does not like the position he can drag the window (the title bar) to a position that suits him.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







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