HTML
  Home arrow HTML arrow Page 3 - Sending Email with AJAX: Building a Small ...
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

Sending Email with AJAX: Building a Small Application
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 27
    2006-01-17

    Table of Contents:
  • Sending Email with AJAX: Building a Small Application
  • Getting started: developing the application’s user interface
  • Spicing things up: writing the CSS rules for the AJAX email application
  • Working with building blocks: defining the (X)HTML markup for the email application

  • 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


    Sending Email with AJAX: Building a Small Application - Spicing things up: writing the CSS rules for the AJAX email application


    (Page 3 of 4 )

    To keep things really simple, the whole structure of the user interface you just saw will be comprised of only three DIV elements. The first one will be the containing block that will wrap up both the left and right panels respectively. With reference to the process for collecting message data, I’ll use only two regular forms, handy for adding new contacts as well as for sending email messages.

    As you can see, the user interface utilized by the program is quite simple, so here are the CSS styles that will give the look and feel for each (X)HTML element included in the web document:

    body {
                margin: 0;
                padding: 0;
    }
    h1 {
                font: bold 16px Arial, Helvetica, sans-serif;
                margin: 5px;
    }
    a:link,a:visited {
                display: block;
                width: 120px;
                padding: 2px 0 2px 5px;
                font: bold 12px Verdana, Arial, Helvetica, sans-
    serif;
                color: #00f;
                text-decoration: none;
                border: 1px solid #cc3;
    }
    a:hover {
                color: #f33;
                background: #fff;
                border: 1px solid #000;
    }
    form {
                display: inline;
    }
    textarea {
                width: 575px;
                height: 380px;
                margin-left: 5px;
                background: #ffc;
                border: 1px solid #000;
    }
    #container {
                width: 800px;
                height: 572px;
                padding: 5px;
                margin-left: auto;
                margin-right: auto;
                background: #cc9;
                border: 1px solid #000;
    }
    #mailsection{
                float: left;
                width: 590px;
                height: 570px;
                margin-left: 5px;
                background: #cc3;
                border: 1px solid #000;
    }
    #contsection {
                float: left;
                width: 200px;
                height: 570px;
                background: #cc3;
                border: 1px solid #000;
                overflow: auto;
    }
    .mailfield {
                width: 575px;
                height: 20px;
                margin: 0 0 5px 5px;
                border: 1px solid #000;
                background: #ffc;
                font: bold 11px Verdana, Arial, Helvetica, sans-
    serif;
                color: #000;
    }
    .mailbutton {
                width: 120px;
                height: 25px;
                margin-left: 5px;
                font: bold 11px Verdana, Arial, Helvetica, sans-
    serif;
                color: #000;
    }
    .contfield {
                width: 185px;
                height: 20px;
                margin: 0 0px 5px 5px;
                border: 1px solid #000;
                background: #ffc;
                font: bold 11px Verdana, Arial, Helvetica, sans-
    serif;
                color: #000;
    }

    As shown in the CSS declarations above, I’ve styled the three DIVS mentioned before, together with the buttons and form fields that make up the respective web interface. Also, I’ve specified some additional styles for <h1> headers and links, but as I said earlier, feel free to write the CSS rules that best suit your specific needs.

    At this point, I’ve shown you the CSS styles tied to the (X)HTML markup. Now, let’s move forward and define the structure of the web document, in order to finish building the application’s user interface. Scroll down the page and keep on reading.

    More HTML Articles
    More By Alejandro Gervasio


       · Without a doubt, AJAX exposes a great versatility for building different Web-based...
       · The AJAX Email tutorial is very interesting and should be helpful to those who want...
       · Hello,I thank you for posting your comments on this tutorial, and of course it's...
     

    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 3 Hosted by Hostway
    Stay green...Green IT