Skip to main content
Participant
August 27, 2010
Question

creating a submit button to fetch topic tile and other info and send an email

  • August 27, 2010
  • 4 replies
  • 637 views

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?

    This topic has been closed for replies.

    4 replies

    MergeThis
    Inspiring
    August 30, 2010

    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

    Willam van Weelden
    Inspiring
    August 28, 2010

    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

    Peter Grainge
    Community Expert
    Community Expert
    August 27, 2010

    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

    @petergrainge

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    RoboColum_n_
    Legend
    August 27, 2010

    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
    Participant
    August 27, 2010

    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.