JavaScript
  Home arrow JavaScript arrow Page 3 - 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 SMTP client's structural markup


    (Page 3 of 4 )

    Now I will build the basic structural markup corresponding to this Prototype-based SMTP client, in this way completing the definition of its friendly user interface.

    Below I included the respective (X)HTML code that defines the basic structure of this email application. Have a look at the following code listing, please:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-
    8859-1" />

    <title>Prototype-based SMTP Client</title>

    </head>

    <body>

    <h1>Prototype-based SMTP Client</h1>

    <div id="maincontainer">

    <div id="state">STATUS: COMPOSING MESSAGE...</div>

    <form id="mailform">

    <p>To: <input type="text" id="to" title="enter email address of
    recipient" class="textbox" /></p>

    <p>Subject: <input type="text" id="subject" title="enter the
    subject of your message" class="textbox" /></p>

    <p>Cc: <input type="text" id="cc" class="textbox" /></p>

    <p>Bcc: <input type="text" id="bcc" class="textbox" /></p>

    <p><textarea name="message" title="Type here the text of your
    message" id="message"></textarea></p>

    <p><input type="submit" value="Send Message" class="formbutton"
    title="Send Message"/>

    <input type="reset" value="Clear All Fields" class="formbutton"
    title="Clear All Fields" />

    <input type="button" value="Clear Message" class="formbutton"
    title="Clear Message" id="resetbutton"/></p>

    </form>

    </div>

    </body>

    </html>

    Since the definition of the above (X)HTML file is very easy to follow, I won't bore you explaining irrelevant details. The only thing worth stressing here with reference to the signature of the previous file is the inclusion of a regular web form for letting users enter the email address of a specific recipient, the respective message's subject, and of course the text of the message in question.

    This online form will also allow you to easily specify whether the message will be sent to additional receivers. For this reason, it will include two extra fields to be used for entering the email addresses corresponding to receivers of carbon copies and blind carbon copies respectively. Quite simple, isn't it?

    Okay, now that you know how the structural markup of this Prototype-based SMTP application has been created, it's time to see how this code can be integrated into the set of CSS styles that you learned in the previous section. Doing so will give you a much better idea of how the presentational and structural modules that comprise this email application fit each other.

    Wan to see how this process will be achieved? All right, go ahead and read the following section.

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