Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2005
    Location
    Planet Satan
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Emailing form data

    I need to email a summary form to the receipt but i couldnt capture the form data to Outlook's textfield. Can someone give me some pointers? I have tried using mailto at form header but to no avail..Or is there any other way to do this???
    Last edited by AlphonseElric; 08-10-2005 at 09:24 AM.

  • #2
    New Coder
    Join Date
    Jul 2005
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <HTML>
    <Head>
    <Script Language=JavaScript>
    
    	function sendMail(isForm){
    
    		isBody = "";
    		recipient = "me@someDomain.com";
    		isSubject = "Form Data";
    		isBody = "Name: " + isForm.personal.value +"%0D%0A";
    		isBody += "Address: " + isForm.address.value +"%0D%0A";
    		isBody += "City: " + isForm.city.value +"%0D%0A";
    		isBody += "State: " + isForm.state.value +"%0D%0A";
    		isBody += "Zip: " + isForm.zip.value;
    		document.forms.Send.action = "mailto:"+recipient+"?subject="+isSubject+"&body="+isBody+"&nbsp";
    	}
    
    </Script>
    </Head>
    <Body>
    <Form name='Form1'>
    Name <input name='personal' value="John Doe" size=25><br>
    Address <input name='address' value="123 Main Street" size=30><br>
    City <input name='city' value="Springfield" size=15> State <input name='state' value="OH" size=2><br>
    Zip Code <input name='zip' value="12345" size=4><br>
    </Form>
    <Form name='Send' action=''>
    <input type="submit" value="Send by Email" onclick="sendMail(document.Form1)">
    </Form>
    </Body>
    </HTML>

  • #3
    New Coder
    Join Date
    Aug 2005
    Location
    Planet Satan
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a lot, ur a great help.

    cheers~

  • #4
    New Coder
    Join Date
    Aug 2005
    Location
    Planet Satan
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    isBody += "State: " + isForm.state.value +"%0D%0A";

    does this kind of line usable for radio buttons???


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •