Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using mailto html in text box with rich text format

Status
Not open for further replies.

magicmandan

Programmer
Mar 9, 2010
13
Hi I'm having problems getting the mailto hyperlink working in a text box on a form that has text format of "rich text", control source being a memo data type.

To test the rich text control and source i have created a form with 2 text boxes, one set to rich text the other plain text so that i can add any html to the plain tesxt and see the correct display on the rich text box.

All website hyperlinks work as they should using:

<a href="
Using the following standard html mark up for mailto doesn't create the hyperlink in the rich text formatted textbox.

<a href="mailto:enquiries@here.org.uk">email</a>

In the rich text control it just displays "email" with no underlining or hyperlink ability.

However if i change this to:
<a href="
The rich text control shows underlined as a hyperlink and when clicked actually opens the default mail client with a new message (rather than trying to open a browser window! which is what I want but the new mail message 'To' is which is not acceptable)

I can't understand what is going on, it seems rich text can create a mail message like i intend but only by appending www. to a mailto item. Any help would be appreciated.
 
EDIT....

With more experiment I have changed the mailto html to read:

<div>&nbsp;<a href="mailto:enquiries@here.org.uk">mailto:enquiries@here.org.uk</a></div>

This now opens the default mail client and adds the correct 'to' address : "enquiries@here.org.uk" the only problem being now is that in the rich text box control the line is displayed as:

mailto:enquiries@here.org.uk

this works perfectly for someone using the hyperlink functionality but users who are just going to copy this email address or manually write an email they may include the 'mailto:' part thinking it is actually the full email address to write to.

So how do i just get the rich text to display enquiries@here.org.uk?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top