Connecting Tech Pros Worldwide Forums | Help | Site Map

HTML formatting in a javascript MAILTO string

Goo
Guest
 
Posts: n/a
#1: May 3 '06
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.


RobG
Guest
 
Posts: n/a
#2: May 3 '06

re: HTML formatting in a javascript MAILTO string


Goo said on 03/05/2006 3:40 PM AEST:[color=blue]
> 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?[/color]

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.com/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
Dr John Stockton
Guest
 
Posts: n/a
#3: May 3 '06

re: HTML formatting in a javascript MAILTO string


JRS: In article <FbY5g.1164$Nv4.165236@news.optus.net.au>, dated Wed, 3
May 2006 06:36:21 remote, seen in news:comp.lang.javascript, RobG
<rgqld@iinet.net.au> posted :
[color=blue]
>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.[/color]

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.

[color=blue]
>If this is for a web site, use the form to submit information to the
>server, then generate the e-mail from there.[/color]

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.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#4: May 13 '06

re: HTML formatting in a javascript MAILTO string


RobG wrote:
[color=blue]
> Goo said on 03/05/2006 3:40 PM AEST:[color=green]
>> 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.
>> [...][/color]
>
> Use an e-mail client that does what you want.
>
> Don't use mailto - it is not standardised[/color]

But it is pretty close to being a standard:

<URL:http://rfc-editor.org/rfc/rfc2368.txt>
[color=blue]
> and works differently in different browsers and e-mail clients - if the
> browser knows about an email client at all.[/color]

However, this has to be taken into account.
[color=blue]
> If this is for a web site, use the form to submit information to the
> server, then generate the e-mail from there.[/color]

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"
Randy Webb
Guest
 
Posts: n/a
#5: May 13 '06

re: HTML formatting in a javascript MAILTO string


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:
[color=blue]
> RobG wrote:
>[color=green]
>> Goo said on 03/05/2006 3:40 PM AEST:[color=darkred]
>>> 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.
>>> [...][/color]
>> Use an e-mail client that does what you want.
>>
>> Don't use mailto - it is not standardised[/color]
>
> But it is pretty close to being a standard:[/color]

But it is *not* a standard.
[color=blue]
> <URL:http://rfc-editor.org/rfc/rfc2368.txt>
>[color=green]
>> and works differently in different browsers and e-mail clients - if the
>> browser knows about an email client at all.[/color]
>
> However, this has to be taken into account.[/color]

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.
[color=blue][color=green]
>> If this is for a web site, use the form to submit information to the
>> server, then generate the e-mail from there.[/color]
>
> True.[/color]

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



--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Closed Thread


Similar JavaScript / Ajax / DHTML bytes