Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / October 2003

Tip: Looking for answers? Try searching our database.

form to email

Thread view: 
Roedy Green - 21 Oct 2003 20:44 GMT
Has anyone written a tool that lets an HTML programmer
produce a list of fields, and it generates a form to be inserted into
the HTML and a corresponding bit of server code to turn the thing into
a plausible email?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green - 23 Oct 2003 23:35 GMT
>Has anyone written a tool that lets an HTML programmer
>produce a list of fields, and it generates a form to be inserted into
>the HTML and a corresponding bit of server code to turn the thing into
>a plausible email?

It would work like this:

You compose a form description document using an ordinary text editor.
It might look something like this:

INVISIBLE SECTION
to: tickets@bccla.org
subject: Steven Lewis event tickets

VISIBLE SECTION
name: mandatory text;
address: mandatory text;
address2: optional text;
home-phone: optional phone;
city: mandatory text;
postal-code: optional postal;
preferred-date: optional yyyy-mm-dd;
ticket-type: optional choice( balcony, orchestra, gods  );
email: mandatory email;

You submit this to a Java program that runs on your machine.  It
produces two things:
some HTML you can include inside your webpage and a JSP program.
You have to upload the JSP program to the webserver.

You web page would look like a two column table.
The server would issue error messages for invalid or missing fields in
a third column.
showing just the erroneous form on a page by itself.
When the user got it all correct. He would se a page that just said
"form sent, Click Back to resume"

The server would then take the form apart and produce an email.
The arriving email would look like this:
name: Roedy Green
address: #327-964 Heywood Avenue
...
At the bottom of the email it would be reencoded in CSV format or
possibly XML, whatever it turns out your database likes to eat.
e.g. Roedy Green,#327-964 Heywood Avenue,,Victoria,

Alternatively that could be a separate email sent to a different email
address.  If you want to get very fancy, I could even cook up
something to periodically check the mail and import the results into
your database. We will have to see just how amenable the database is
to automated importing.

This does not handle credit cards.  That is yet another kettle of
fish.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.