473,811 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML formatting in a javascript MAILTO string

Goo
Hi. Looking for some advice.

I have a simple javascript that gathers email from a HTML form and then

upon the submit button click, it opens a default mail window with
"mailto" and inserts some text and form field data, etc, in the body of

the email.
My only problem is, in Outlook, my default message settings are to
insert a stationary background and signature file.
But whenever I run the javascript and use the mailto command, it won't
invoke my default email settings or use the HTML background, etc.
Any advice?
Thanks.

May 3 '06 #1
4 3723
Goo said on 03/05/2006 3:40 PM AEST:
Hi. Looking for some advice.

I have a simple javascript that gathers email from a HTML form and then
upon the submit button click, it opens a default mail window with
"mailto" and inserts some text and form field data, etc, in the body of
the email.

My only problem is, in Outlook, my default message settings are to
insert a stationary background and signature file.

But whenever I run the javascript and use the mailto command, it won't
invoke my default email settings or use the HTML background, etc.
Any advice?


Use an e-mail client that does what you want.

Don't use mailto - it is not standardised and works differently in
different browsers and e-mail clients - if the browser knows about an
email client at all.

If this is for a web site, use the form to submit information to the
server, then generate the e-mail from there.
--
Rob
Group FAQ: <URL:http://www.jibbering.c om/FAQ>
"It is much easier for a web developer to create a site
that receives no complaints than to create a site that
doesn't warrant any."--Richard Cornford
May 3 '06 #2
JRS: In article <Fb************ *******@news.op tus.net.au>, dated Wed, 3
May 2006 06:36:21 remote, seen in news:comp.lang. javascript, RobG
<rg***@iinet.ne t.au> posted :
Don't use mailto - it is not standardised and works differently in
different browsers and e-mail clients - if the browser knows about an
email client at all.
An author cannot be sure, on the Web, that a reader will have his E-mail
system on the machine with which he is currently browsing. My E-mail
system is here; but I use a browser at a Public Library, where I have no
E-mail facility. Also, the browser user may not be the potential mail-
sender. Therefore, to accommodate all possibilities, the reader needs
to be able to write the E-address on paper for later use.

But, where mail & browser are on the same system, it seems common for
selecting a mailto URL to get that E-address used to begin a new E-mail.
That will at least save transcription errors, and, while it should not
be relied on, it may be that other information is also transferred to
the E-mail.

If this is for a web site, use the form to submit information to the
server, then generate the e-mail from there.


Some Web sites do not have servers that can do that (or their authors
have not set up that facility). Some readers prefer to handle all E-
mail fully on their own systems, so that is all appropriately filed.

If the form approach is used, and free text input is provided, make the
initial area large enough; and provide means to resize it.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
May 3 '06 #3
RobG wrote:
Goo said on 03/05/2006 3:40 PM AEST:
But whenever I run the javascript and use the mailto command, it won't
invoke my default email settings or use the HTML background, etc.
[...]
Use an e-mail client that does what you want.

Don't use mailto - it is not standardised


But it is pretty close to being a standard:

<URL:http://rfc-editor.org/rfc/rfc2368.txt>
and works differently in different browsers and e-mail clients - if the
browser knows about an email client at all.
However, this has to be taken into account.
If this is for a web site, use the form to submit information to the
server, then generate the e-mail from there.


True.
PointedEars
--
But he had not that supreme gift of the artist, the knowledge of
when to stop.
-- Sherlock Holmes in Sir Arthur Conan Doyle's
"The Adventure of the Norwood Builder"
May 13 '06 #4
Thomas 'PointedEars' Lahn typed the following on the 13th Day of May,
year 2006 to reply to a post that is 11 days old. TL is attempting to
show his ineptness at prompt replies:
RobG wrote:
Goo said on 03/05/2006 3:40 PM AEST:
But whenever I run the javascript and use the mailto command, it won't
invoke my default email settings or use the HTML background, etc.
[...] Use an e-mail client that does what you want.

Don't use mailto - it is not standardised


But it is pretty close to being a standard:


But it is *not* a standard.
<URL:http://rfc-editor.org/rfc/rfc2368.txt>
and works differently in different browsers and e-mail clients - if the
browser knows about an email client at all.


However, this has to be taken into account.


No it doesn't. Use a form and you don't have to take anything on the
client into account other than the ability to fill out fields and submit
the form.
If this is for a web site, use the form to submit information to the
server, then generate the e-mail from there.


True.


And if you do that, you don't have to "take into account" browser/email
client combinations.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 13 '06 #5

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

Similar topics

4
17600
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I change the name of the "DoB" textbox to something like "Telephone" or "TelephoneBirthdate", the textbox changes to sunken, and yellow. I have tried changing the name to "DBirth", "BirthDate", "Birthday", "cusBirth", "DOBirth", etc. but, the...
2
12606
by: Joe W Larson | last post by:
I've been up and down trying to figure this one out with no luck. Is it possible to have a mailto link or some other way with Javascript that can send the HTML content of the current page or of an IFRAME in the page as an email? Here's what I have: ---------------- <HTML> <SCRIPT LANGUAGE="JavaScript"> <!--//
7
5498
by: Ot | last post by:
I posted this to the wrong group. It went to m.p.dotnet.languages.vb. Ooops. -------------------------------------------------------------------- I have this tiny problem. I have learned that an xpath expression can be bounded by either single or double quotation marks. But sometimes I want to search for a title containing both a single and double quote. Any way to do this?
3
2053
by: rvanvolken | last post by:
After sending an email message formatted for HTML using the STMP Mail function within .NET, my message arrives with exclamation marks throughout the text, which inadvertantly hinders the correct formatting of the text. Importing the source from one of these messages to Microsoft Word, I was able to see that after each of the exclamation marks a hidden paragraph mark exists. I've read other postings where the developer used StringBuilder...
0
1670
by: George Durzi | last post by:
I'm trying to pop up a mailto: window using server side script, here's how I'm doing this. string sBody = string.Concat("Test", @"\", Environment.NewLine, "Test", @"\", Environment.Newline); string sSubject = "Test Email"; string sScript = string.Concat(@"window.open('mailto:?subject=", sSubject, "&body=", sBody, "')"); StringBuilder sbEMNote = new StringBuilder();
6
5527
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp; DataBinder.Eval(Container.DataItem,"StoreEmail") &amp; "&amp;Subject=" &amp; DataBinder.Eval(Container.DataItem,"ProductName") ....
2
3063
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is what I'm hoping to achieve. I've never before had to use Javascript closures, but now I do, so I'm making an effort to understand them. I've been giving this essay a re-read: http://jibbering.com/faq/faq_notes/closures.html
2
4384
by: Slain | last post by:
I have a big list of HTML files, which need to be updated with a common text. <script language=JavaScript src="./highlight.js"></script> I need to add the above line in each of the html files, before the text "<\head>". All the HTML files have this text and I think some kind of search on this string and either replacing "</head>" with the
2
8824
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However, the plain-text-only email clients I've tried keep reading my plain text email and formatting it in all kinds of crazy ways.
0
9605
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
10647
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
10395
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
10130
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...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7667
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
6887
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
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.