I found this javascript in a MadCap turorial: https://docs.madcapsoftware.com/flare20 ... torial.pdf
And it contains this code:
function sendMail() {
var email=('myname@company.com');
var ccemail=('othername@company.com');
var subject="Feedback from topic: " + document.title;
var body="Feedback from topic: " + document.title + " (" +
window.location.href + ")";
var link = "mailto:" + email
+ "?cc=" + ccemail
+ "&subject=" + subject
+ "&body=" + body;
window.location.href = link;
}
Is it possible to modify this code so I don't include a CC address without breaking it?
How to add an email button with no CC address
Re: How to add an email button with no CC address
I believe all you need to do is delete the whole ?cc line and then replace &subject with ?subject
You could also delete the 'var ccemail' line for tidiness but I don't think it would break anything to leave in.
You could also delete the 'var ccemail' line for tidiness but I don't think it would break anything to leave in.
-
SteveS
- Senior Propellus Maximus
- Posts: 2090
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: How to add an email button with no CC address
I'd try:
Code: Select all
function sendMail() {
var email=('myname@company.com');
var subject="Feedback from topic: " + document.title;
var body="Feedback from topic: " + document.title + " (" +
window.location.href + ")";
var link = "mailto:" + email
+ "&subject=" + subject
+ "&body=" + body;
window.location.href = link;
}Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: How to add an email button with no CC address
That worked. Thanks so much!Psider wrote:I believe all you need to do is delete the whole ?cc line and then replace &subject with ?subject
You could also delete the 'var ccemail' line for tidiness but I don't think it would break anything to leave in.
John