HTML
  Home arrow HTML arrow Finding Values and More with Web Page Dial...
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

Finding Values and More with Web Page Dialog Boxes
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-01-26

    Table of Contents:
  • Finding Values and More with Web Page Dialog Boxes
  • Easy Way of Creating Descendant Dialog Boxes
  • Developing the String
  • Commercial Project

  • 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


    Finding Values and More with Web Page Dialog Boxes


    (Page 1 of 4 )

    In this conclusion to a five-part series, we'll wrap up our discussion of what you can do with web page dialog boxes. Among other things, we include some tips you'll need to keep in mind when you include web page dialog boxes in your commercial projects.

    Accessing Value in a Descendant Window

    You may recall that in the previous part of this series, we left off with an explanation of how to access the value in an ancestor window. The process of accessing a value in a descendant window is similar. You can put the following code in the JavaScript in every window:


    function followOrReturn(name)

    {

    if (window.name == name)

    {

    return window.self;

    }

    else

    {

    return window2.followOrReturn(name);

    }

    }


    This function, like the one before it, is called by another function or event in the same window. The function receives the name of the descendant window that interests you as an argument. It first checks to see if the name it has received is the name of its window. If that is true, it determines the reference of the window it is in and returns it; otherwise, it forwards the request to the immediate child window, calling the same function there.

    In order to call a function in the child window, it needs a reference to the child window. We have been opening child windows as follows:


    childReference = window.open();


    where “window ” is the window having the JavaScript code. As you can see, each time we do this, we have a reference to the child window in the parent window. From the parent window you can use this reference to do something in the child window.

    When the followOrReturn(name) function is in every page, it allows messages to be propagated from child to child. This enables you to get the reference of a descendant window, if you know the name of that descendant window. You can then use the reference in whatever ancestor window you are in, to access value in the descendant window.

    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 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek