Copy link to clipboard
Copied
I am required to make a feedback form which will have only a comments text box and a submitt button.Now,I want the submit button to fetch the topic title and comments and send an email to the e-mail address given.I am not able to figure out how to get the topic title.Any suggestions?
Copy link to clipboard
Copied
Hi sonypix2008 and welcome to the RH forums.
You may want to check out this link which should point you to what you need to know.
The RoboColum(n) | @robocolumn | Colum McAndrew |
Copy link to clipboard
Copied
McAndrew thanks for the reply...but this is not what i want..i know about the FormMail script...but what i want is a method to fetch the topic title(<TITLE>something written</TITLE>)..I want to get this "something written" and send it along with the comments.
Copy link to clipboard
Copied
Or by pass the form and create a link that opens an email with what you want in it.
See Snippet 38 on my site.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi,
To get the topic title in JavaScript, simply use:
Var Title = document.title;
You can now use the document title in the rest of the script.
Greet,
Willam
Copy link to clipboard
Copied
We use a combination of topic link and external JavaScript file (make changes to all red text as per your needs).
IN THE TOPIC (note the path to the external script is at the root level of a merged WebHelp project):
===========
<!--(HR)============================================================-->
<hr style="width: 300px;
float: aligncenter;
color: #d9e4da;
x-condition: Online;"
width=300
align=center
color=#D9E4DA>
<p style="text-align: center; x-condition: Online;"
align=center><script src="../../feedback_script.js"
language=javascript
type="text/javascript"
style="x-condition: Online;"></html></script></p>
EXTERNAL JAVASCRIPT FILE (note the \n\n, which denotes a double new line for a paragraph break):
=======================
var mailSubject = 'Online Help Vx.x.x Comment';
var mailBody = '[Enter comments here] \n\nMy comments apply to this page: ' + location.href;
var mailDisplay = 'Feedback on this page';
document.write(
'<a href="mailto:docteam@ajax.com'
+ '?subject=' + escape(mailSubject)
+ '&body=' + escape(mailBody)
+ '">' + mailDisplay + '</a>');
Good luck,
Leon