473,831 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with mailto: and form results in message body

I don't have access to a server-side solution, so I guess Javascript
is my only choice.

I want to pass a bunch of form fields to an email, but unsure of how
to add the multiple fields into the body section.

What I want to add is the "dropdown" data merged into the body of the
email.
I found this example code (that works just the way I want it to,
except I want to add more data).
My changes are below it:

<script>
function now()
{
var thebody=documen t.testform.theb ody.value;
window.location .href="mailto:s o*****@invalid. com?subject=Mai l
Test&body=" +
escape(thebody) ;
}
</script>
<form name=testform>
<input type=button value="click me" onclick="now()" >
<textarea name=thebody>
This is test email body data.
</textarea>
</form>
----------------------------------
My changes
----------------------------------
<script>
function now()
{
var thebody=documen t.testform.theb ody.value;
var dropdown=docume nt.testform.dro pdown.value;
window.location .href="mailto:s o*****@invalid. com?subject=Mai l
Test&body=" +
(thebody)+(drop down);
}
</script>
<form name=testform>
<input type=button value="click me" onclick="now()" >
<textarea name=thebody>
This is test email body data.
</textarea>

<select size="1" name="dropdown" >
<option>yes</option>
<option>no</option>
</select></form>
Aug 8 '08 #1
1 1377
G. Morgan wrote:
I don't have access to a server-side solution,
Get one.
so I guess Javascript is my only choice.

I want to pass a bunch of form fields to an email, but unsure of how
to add the multiple fields into the body section. [...]
Client-side scripting is not going to provide an equivalent solution here.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Aug 9 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2117
by: Eagle35 | last post by:
hi all im new to the whole java thing and need some help! im trying to make an e mail form and when i test it, it sends the e mail to the designated e mail address but when i go to the e mail account i sent it to it doesnt have any info that should have been submitted all i get in the e mail is: name=
7
8698
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong, somehow I always end up with error messages and functions not working right. Can someone please help me? I have a form, inside is 1 Text Field and 2 Password Fields. What I'm looking to do is: - Make sure password fields are equal - Set...
15
29925
by: Val | last post by:
Any experts on mailto: tags? I want to set a link so that the subject and some of the body of the email is filled in. This is easy for simple text, although you need to use %20 for spaces: <a href="mailto:nobody@nowhere.com ?subject=Your web site &body=This%20is%20the%20%body!"> click here</a>
5
18798
by: RobG | last post by:
I am trying to get users to fill in a form on a web page, then click a button to send an e-mail. I am using JavaScript to get the fields from the form, then run a mailto command to put the information into an email. I can create a mailto link in the page using innerHTML, but it seems silly to click a button, a link appears, then click on the link. How do I execute the mailto command using JavaScript?
5
29717
by: timjowers | last post by:
Hi, I'm attempting to send a mailto: and include a link in the body. Has anyone done this? Also, has anyone done mailto: with Lotus Notes 6.5? It will place the body in the subject line if it is above a certain length of about 64 characters! Also, Lotus Notes does not un-escape/decode URL encoded strings.
3
2243
by: Brian Bischof | last post by:
I'm have a form with a datagrid showing a checkbox for each row. I want the user to be able to click a checkbox and then click a button that sends an email similar to how the HREF MailTo: works. I can't embed the MailTo: in the webpage b/c the button has to determine which row has a checkbox, pull data from SQL and then build the email content. I originally wrote the code using System.Web.Mail classes but the client doesn't like it b/c they...
0
5578
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
2
5154
by: GArlington | last post by:
"G. Morgan" <no_em@il.invalidwrote in message news:8787770faf30b1bd48f393baa1a89fdbnp@mypost.invalid... <snap> <snap> Did you try <cr><lf combination? ** Posted from http://www.teranews.com **
12
2349
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two works, thats: 1. Category to search from the (Drop down name: ASPDBCatSearch) is working with the Input Text Box Field (name: keyword), based on Whatever selection on the Drop down value selection:
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7748
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3964
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.