Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-15-2002, 11:34 PM   PM User | #1
Beginner
New to the CF scene

 
Join Date: Jun 2002
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Beginner is an unknown quantity at this point
Forms with arrays

Hello,
I use a form that has several list fields, and the selections are populated through arrays.

Is it correct to assume that in order to have the users responses posted back to me, I need to have a database folder in the root or housed with the server?

If so, is there some way of coding the select fields to avoid this?

Thanks for any help.
Beginner is offline   Reply With Quote
Old 06-16-2002, 01:21 AM   PM User | #2
JohnKrutsch
Regular Coder

 
Join Date: Jun 2002
Location: The Planet Earth Code Poet: True
Posts: 282
Thanks: 0
Thanked 1 Time in 1 Post
JohnKrutsch is an unknown quantity at this point
As this is the client-side JavaScript forum I will give you the client-side Javascript answer. It is possible to have the form submitted to you using client-side javascript and email. When the form is submitted it sends an email to you with the form data. Often times a popup will warn the user that the information is being submitted by email.

If you do not want to have the info emailed to you in this manner you will have to use a server-side language.
JohnKrutsch is offline   Reply With Quote
Old 06-16-2002, 01:31 AM   PM User | #3
Beginner
New to the CF scene

 
Join Date: Jun 2002
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Beginner is an unknown quantity at this point
Hello John,

I'd be happy to have the form submitted an posted back to me in the manner you mentioned. Are there any tutorials that you know of that would show me how to accomplish having the users choices from select lists that are populated through arrays posted back to me?

Thanks for your response.
Beginner is offline   Reply With Quote
Old 06-16-2002, 02:52 PM   PM User | #4
JohnKrutsch
Regular Coder

 
Join Date: Jun 2002
Location: The Planet Earth Code Poet: True
Posts: 282
Thanks: 0
Thanked 1 Time in 1 Post
JohnKrutsch is an unknown quantity at this point
Sure, the key is to set up your form tag correctly:

<form method="post" action="mailto:xxx@xxx.xxx" enctype="text/plain">

Of course you would replace all the xxx stuff with the email address you would like to send to. Upon subbmission, the data that was entered into the form and seleceted by the user will be emailed to you.

For a full blown tutorial see:

http://developer.netscape.com:80/vie...to/mailto.html
JohnKrutsch is offline   Reply With Quote
Old 06-18-2002, 01:00 AM   PM User | #5
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Dang, he beat me to it. I always recommend that tutorial.

P.S. They also have an example javascript formatting method at the bottom of that page; however there IS a problem with that method though regarding Microsoft Outlook/Outlook Express that I ran into if the script or message gets to be too long...

Anyway post back if you run into any problems. If you do, you might find it easier to just post the whole email as John Krutsch suggested:

action="mailto:who@what.com" enctype="text/plain"

in the form tag, instead of the javascript route they have as an example. It's uglier, but it gets the job done.
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:27 AM.


Advertisement
Log in to turn off these ads.