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:
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.