JavaScript
  Home arrow JavaScript arrow Page 2 - Building an SMTP Client with Prototype
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? 
JAVASCRIPT

Building an SMTP Client with Prototype
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 4
    2007-09-26

    Table of Contents:
  • Building an SMTP Client with Prototype
  • Defining the front end of the Prototype-driven SMTP client application
  • Defining the SMTP client's structural markup
  • Listing the complete client-side code for the SMTP 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


    Building an SMTP Client with Prototype - Defining the front end of the Prototype-driven SMTP client application


    (Page 2 of 4 )

    The first step involved in the creation of this Prototype-based SMTP client consists logically of defining the look and feel that this application is going to have.

    Since the program that I plan to develop in this series must be capable of sending email to a specified recipient, in addition to working with carbon copies (CC) and blind carbon copies (BCC), the application's visual appearance will look similar to the image below: 

    As you can see, the previous screen shot illustrates in a clear fashion how the front-end of this SMTP client is going to look. As I said earlier, the user interface that corresponds to this application must provide users with the ability to enter a recipient's email address and to specify additional receivers. As shown in the image above, the front end will include the form fields required for entering all this data.

    Okay, at this moment I'm pretty sure that the above picture should give you a clear idea of how the visual appearance of this SMTP client application will be created. However, this section of the article would be rather incomplete if I don't show you the corresponding CSS styles that provide the email application with the look and feel that you saw in the previous screen shot.

    Having said that, here is the list of CSS rules that precisely define the visual appearance corresponding to this Prototype-based SMTP client. Have a look at it, please:

    <style type="text/css">

      body{

        padding: 0;

        margin: 0;

        background: #fff;

     }

      h1{

         font: bold 24px Arial, Helvetica, sans-serif;

          color: #000;

        text-align: center;

     }

     p{

         font: bold 12px Arial, Helvetica, sans-serif;

          color: #000;

         padding-right: 100px;

       text-align: right;

     }

     textarea{

       width: 400px;

        height: 300px;

        padding: 2px;

        font: normal 12px Arial, Helvetica, sans-serif;

         color: #000;

     }

     #maincontainer{

       width: 600px;

        height: 550px;

        margin-left: auto;

        margin-right: auto;

       background: #f5ebb1;

       border: 1px solid #000;

     }

     #state{

         font: bold 12px Arial, Helvetica, sans-serif;

          color: #00f;

         padding: 10px 0 10px 10px;

     }

     .textbox{

       width: 400px;

        padding: 2px;

        font: normal 12px Arial, Helvetica, sans-serif;

         color: #000;

     }

     .formbutton{

        font: normal 12px Arial, Helvetica, sans-serif;

         color: #000;

     }

    </style>

    As you can see, this straightforward set of CSS styles shouldn't give you any problems as far as understanding how it fits into the schema imposed by this SMTP application.

    Basically, aside from styling some common elements of the web document where the application is going to work, such as <h1> headers, text areas and paragraphs, I included a "maincontainer" selector. As you may have guessed, this selector will be responsible for housing the respective web form, which is handy for entering the email address of the eventual recipient, the data corresponding to additional receivers and the text of the message to be submitted. This process sounds pretty logical, right?

    Well, at this stage hopefully you learned how the group of CSS styles that were shown previously does its business, with reference to defining the pertinent visual appearance of this expandable SMTP client. Nonetheless, the styles would be rather disconnected from the application's overall context if I don't define its corresponding structural markup.

    Therefore, in the upcoming section of this tutorial I'll define the (X)HTML code that corresponds to the front-end of this SMTP client, certainly a procedure that will be very easy to follow.

    To see how this task will be performed, please click on the link that appears below and keep reading.

    More JavaScript Articles
    More By Alejandro Gervasio


       · True to form, the AJAX capacities offered by the Prototype JavaScript library are...
       · just made me lose time, title of tutorial is prototype and afterall al its just...
       · yap, major time lost
       · It’s not just CSS at all. The backend of the SMTP client program was developed in...
       · Well, your opinion is valid, but if you don’t like my article, then just don’t read...
     

    JAVASCRIPT ARTICLES

    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in
    - Active Client Pages at the Server
    - ACP Tab Web Page







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