Form Problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Form Problem

  1. #1
    ken Guest

    Form Problem


    Hi everybody,

    I needed to create a HTML form and allow users to enter data into the
    form. Then the form data is posted to someone according to the email address,
    for example, "mailto:abc@abc.com", when the submit button of the form is
    pressed.

    I find that from ccmail, the form data is concentrated together with "&"
    as a seperator. Is there any suggestion using asp to process data and then
    send to receiver by only pressing the submit button ? The received email
    data is clearly seen line by line for each field corresponding to the form.

    Thanks in advance.

  2. #2
    Glenn Guest

    Re: Form Problem


    "ken" <kenmui@willas-array.com> wrote:
    >
    >Hi everybody,
    >
    > I needed to create a HTML form and allow users to enter data into the
    >form. Then the form data is posted to someone according to the email address,
    >for example, "mailto:abc@abc.com", when the submit button of the form is
    >pressed.
    >
    >I find that from ccmail, the form data is concentrated together with "&"
    >as a seperator. Is there any suggestion using asp to process data and then
    >send to receiver by only pressing the submit button ? The received email
    >data is clearly seen line by line for each field corresponding to the form.
    >
    >Thanks in advance.

    Ken,
    I'm not sure of what you're trying to do here. Are you actually posting
    the form and then processing the form on the server to then send the email
    or are you doing stuff on the client?

    If you're using Request.Form on the server, all the fields are separated
    by "&". To pull the fields out of the request.form, using Request.Form.Fields("subject")
    and Request.Form.Fields("notes") (or whatever your field names are).

    Are you actually posting to the email address (i.e. your Form element's Action
    property is set to the email address)? If so (and I didn't know that could
    be done), I would think there'd be a better way to simply send an email.

    If you must do it that way, my guess is that you should put only one actual
    field in your form (but keep your other fields on the page outside the form),
    then in your formname_OnSubmit function, pull all the data out of the other
    fields and put them in the one form field, maybe separating them by CR LF's
    (Chr(10) Chr(13)), and submit the form (by not returning false from the function).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center