This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes HTML mailto attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML mailto attribute" Watch "HTML mailto attribute" New topic
Author

HTML mailto attribute

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Hi,
Is it possible to include special characters in "body" attribute of mailto tag ? "mailto" Tag in a html page is constructed dynamically , it fails when the body text contains special characters like '&' or ". Is there any way to overcome it ?


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
escape them.

Eric
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Eric,
The problem is the message body is constructed at runtime, so the end users might type any characters. I need to search for all possible special characters in that string and i should escape them..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61318
    
  66

Some code on how you are building the mailto construct might help.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Thanks Eric & Bear, I'm not aware of Escape function in java script. I got it & works now !!
[ January 25, 2006: Message edited by: Srinivasa Raghavan ]
 
GeeCON Prague 2014
 
subject: HTML mailto attribute