• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

'Mail to' link with topic URL in Subject line?

Guest
Oct 15, 2011 Oct 15, 2011

Copy link to clipboard

Copied

On Peter Grainge's site, snippet 38 gives the code for e-mailing a link to a topic.

Before I go off in the wrong direction, is there any reason why I wouldn't be able to modify the code to capture the topic URL in the Subject line rather than in the body?

My intention is to create a "Feedback" button on the skin toolbar that would generate an e-mail to the Help content authors. In the body of the e-mail I would have the text "Please type your feedback here."

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2011 Oct 16, 2011

Copy link to clipboard

Copied

With anything like this the answer is to create a small test project with just a few topics and see what happens. If it messes up, no harm done to your project.

One thing I would be checking is whether the link is clickable in the subject line. If it is not, it means the recipient has got to cut and paste it into a browser rather than just click it.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 16, 2011 Oct 16, 2011

Copy link to clipboard

Copied

Thanks Peter. In this scenario, the recipient will be the content author, so there will probably seldom be a need to open the topic from the server. The topic name will tell the content author where to go in the project source to find whatever it is that the feedback pertains to.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 16, 2011 Oct 16, 2011

Copy link to clipboard

Copied

So far I have not been able to make this work. Using the skin editor, I am trying to paste the Mailto code into the "On click" property for a button. I've got it working when the topic URL is to be displayed in the body, but not when the same code is inserted into the Subject.

Has anyone seen a worked example I could steal learn from?

Here's the working version of the "On click" action with the topic URL captured in the body --

mailto.png

How would this be modified to capture the topic URL in the Subject line?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 17, 2011 Oct 17, 2011

Copy link to clipboard

Copied

Hi,

See my Toolbar scripts: http://www.wvanweelden.eu/robohelp/toolbarscripts

Replace line 59 with: window.location = "mailto:&subject="+title+" "+escape(url)+"&body="+message+"\n"+title+": "+escape(url);

That should work the way you want.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 17, 2011 Oct 17, 2011

Copy link to clipboard

Copied

Is it possible to do the same thing using an in-line script rather than a stored file?

BTW, IE crashes when I open your Web page and click the script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 18, 2011 Oct 18, 2011

Copy link to clipboard

Copied

Hi,

Try this direct link: http://www.wvanweelden.eu/sites/default/files/download_page/toolbarscripts.js.txt

What exactly do you mean by inline script? You can take the JavaScript out of the script file and paste it in the Inline JavaScript popup under the toolbar action. I would not advise you to add the script as a single onClick event to the button as that will make it all but impossible to maintain the code. For the email function, you need the functions Email(), GetRelTopicURL(), GetMaster(), GetTopicPane() and getTopicTitle().

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 18, 2011 Oct 18, 2011

Copy link to clipboard

Copied

LATEST

Not sure if this helps, but here's a feedback script I named feedback_script.js that I probably tweaked from someone on these forums. It's called from the bottom of each of my topics. It's built around a CHM help so some modification may be needed if viewed outside of a CHM:

<!-- .js file code starts here-->

//alert("made it into script");

// Get just the page name

var str = location.href;

var arr = str.split("::/");

var htm_page = arr[1];

//

var mailSubject = '<your product name> Documentation Feedback - ' + htm_page;

var mailBody = '[Enter comments here] \n\nMy comments apply to this page: ' + location.href;

var mailDisplay = 'Send Feedback on this Topic';

document.write('<a href="#">Back to Top</a> | <a href="mailto:youremail@addresscom' + '?subject=' + escape(mailSubject) + '&body=' + escape(mailBody) + '">' + mailDisplay + '</a>');

<!-- .js file code ends here-->

I then use this inside each topic (it's in my footer in my master page) to show the link at the bottom of each:

<p style="text-align: center;"><script

     language="javascript" src="feedback_script.js" type="text/javascript"></script>

     </p>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp