XML
  Home arrow XML arrow Page 3 - Take AJAX to Your Email Inbox: Developing ...
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? 
XML

Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 90
    2006-03-29

    Table of Contents:
  • Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client
  • Styling the web-based POP 3 client: writing the CSS declarations
  • Defining the POP3 client's structure: coding the (X)HTML markup
  • Creating the skeleton of the client-side application layer: defining generic JavaScript functions

  • 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


    Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client - Defining the POP3 client's structure: coding the (X)HTML markup


    (Page 3 of 4 )

    At this time, you should hopefully have a clear idea of how the application's (X)HTML markup will be defined. Obviously, the top DIV container will house all the corresponding form fields used for entering mail server connection data, together with the button that triggers http requests to the Web server. This sounds really simple and understandable, so it bears no further discussion.

    Similarly, the second containing DIV will be responsible for displaying the list of messages pulled from the server, along with all the possible responses that eventually the host might send back to the client. The only thing worth nothing with reference to this element is that the CSS selector tied to it includes the "overflow: auto;" declaration, which means that, in case the length of the message being displayed would be longer than the height of the pertinent DIV, a scroll bar will be added to it automatically.

    Finally, the third DIV element will be used as a simple wrapper for the navigational buttons that you saw in the screenshot I showed previously.

    After having schematized the visual structure of the web-based POP3 client, let's turn the theory into concrete code. Therefore, here's the corresponding (X)HTML markup, which gives consistency to the program's front-end:

    <div id="serverinfo">
    <form>
    HOST <input name="host" type="text" class="inputbox" title="Enter
    mail hostname/IP address" />
    USER <input name="user" type="text" class="inputbox" title="Enter
    username" />
    PASSWORD <input name="pass" type="password" class="inputbox"
    title="Enter password" />
    <input name="connect" type="button" value="Connect"
    class="formbutton" />
    </form>
    </div>
    <div id="mailcontainer">
    </div>
    <div id="navbar">
    <form>
    <input name="prev" type="button" value="&lt;&lt Prev" class="formbutton" title="Previous message" />
    <input name="next" type="button" value="Next &gt;&gt;" class="formbutton" title="Next message" />
    <input name="clear" type="button" value="Clear" class="formbutton" title="Clear all messages" />
    </form>
    </div>

    Here, I've defined the DIVs I mentioned before, in order to build the structure for the user interface. As described above, the upper DIV houses the form fields that will allow the user to enter mail server connection values, while the bottom DIV wraps up the fancy buttons for navigating back and forth across email messages. The last piece of structural markup rests on the "mailcontainer" DIV element, which, as you may have figured out, will show each of the messages retrieved from the specified server, and incidentally display its respective responses, whether or not the connection process or the retrieval of messages has been successful.

    Considering the fact that I've defined the CSS declarations and the (X)HTML markup responsible for rendering the user interface of the mail client, the question is: what's coming up now? Well, over the next few lines I'll define the generic signature for each JavaScript function that integrates the whole web-based mail application, so you can understand its programming logic. Click the link below and keep on reading.

    More XML Articles
    More By Alejandro Gervasio


       · Considering the numerous web applications that use AJAX to emulate desktop software,...
       · Thanks for writing this tutrial, I am eager to see what next week has prepared for...
       · Thank you for your kind comments about my AJAX tutorial. I hope the next ones will...
       · Oh and btw your php-code gives an error-message: Parse error: parse error,...
       · Kinda late, but he should have mentioned that this script requires PHP5.
       · Thank you for commenting on my article. I'm sorry that you had some problems getting...
       · I have read the artice. But i want to know how to implement this. I...
       · Thank you for your comments on my AJAX article. Concerning your question, using the...
       · Can't log in to the server .. a backslash has been slipped into one of the...
       · Thank you for commenting on my Ajax article. Now, regarding your problem, it’s easy...
     

    XML ARTICLES

    - Using Regions with XSL Formatting Objects
    - Using XSL Formatting Objects
    - More Schematron Features
    - Schematron Patterns and Validation
    - Using Schematron
    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







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