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

Want to Create a Skin Button that runs JavaScript

New Here ,
Sep 18, 2011 Sep 18, 2011

Copy link to clipboard

Copied

Hi Everyone,

I'm using RoboHelp 9.

I found a script (see below) that creates an email and automatically inserts the URL from where the user is sending the email.

I pasted the script directly into the HTML of a page to test it worked – and it does.

However, I now want to add a button to a skin that runs this javascript for each page, and have no idea where to begin to get the button to run correctly. I have been able to create a button on a skin, and can see that there are javascript options but that’s as far as it goes…

<script type="text/javascript">/*<![CDATA[*/document.write("<a href=\"mailto:youremail@company.org?subject=ACME%20Application%20("+document.title+")&body="+location.href+"%0A%0A"+"\">Send Feedback</a>")/*]]>*/</script>

Thanks everyone in advance.

Emma

Views

688

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 ,
Sep 19, 2011 Sep 19, 2011

Copy link to clipboard

Copied

See Snippet 38 on my site. The link in that provides full instructions.


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
New Here ,
Sep 19, 2011 Sep 19, 2011

Copy link to clipboard

Copied

Hi Peter,

Thanks so much for your information - it has worked perfectly!

The only thing that wasn't obvious in the snippet information was where to actually put the script text on the Action tab. At first I pasted the script into the Inline Javascript option in the bottom section. This did nothing so I pasted the script into the OnClick action option. This worked perfectly.

Is it okay to leave the script text in the OnClick option?

Thanks again.

Emma

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
Community Expert ,
Sep 20, 2011 Sep 20, 2011

Copy link to clipboard

Copied

Yes that is the correct place for the code, I will amend the instructions.


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
New Here ,
Sep 20, 2011 Sep 20, 2011

Copy link to clipboard

Copied

LATEST

Great - Thanks again Peter.

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