Copy link to clipboard
Copied
Help, please!
I know nothing about HTML programming, and I have several small links I would like to use with Javascript code.
This is one link for the user to click on:
<p style="font-size: 8pt; text-align: center;" align=center>Print this
page</td>
I have this little piece of Javascript:
<a href="javascript:window.print()">Print this page</a>
How do I put the two together?
I don't have time to learn HTML - I need to get this working by tomorrow!
Thanks for any help...
Hi there
Interesting that you say you don't know anything about HTML or JavaScript, then post the HTML code and the JavaScript code!
I suppose if you want to do it the HTML way, the new code would look something like this:
<p style="font-size: 8pt; text-align: center;" align=center><a href="javascript:window.print()">Print this page</a></td>
However, you should be able to just select the text in the WYSIWYG or Design view and act as if you are linking to another topic. In the Hyperlink dialog you w
...Copy link to clipboard
Copied
Hi there
Interesting that you say you don't know anything about HTML or JavaScript, then post the HTML code and the JavaScript code!
I suppose if you want to do it the HTML way, the new code would look something like this:
<p style="font-size: 8pt; text-align: center;" align=center><a href="javascript:window.print()">Print this page</a></td>
However, you should be able to just select the text in the WYSIWYG or Design view and act as if you are linking to another topic. In the Hyperlink dialog you would type javascript:window.print();
Hopefully this was helpful... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Copy link to clipboard
Copied
Very helpful, Rick, thank you!
I got the HTML code by going to the HTML view instead of the design view, and found the Javascript code on the Internet.
So, for another more complex one (also from the Internet), could I put it in a snippet and link to that in the hyperlink dialog?
Marion
Copy link to clipboard
Copied
Hi Marion.
Unfortunately snippets are not designed to work that way and you can't link to them. You may want to explore a macro solution. There are several around but I prefer Macro Express.
Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
Copy link to clipboard
Copied
Thanks, Colum, I'll look into that too.
Copy link to clipboard
Copied
You are wanting to create a simple link to a Snippet in a topic, correct? It can be done. See Item 4 in http://www.grainge.org/pages/authoring/rh7/using_rh7.htm
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Thanks, Peter. I'll give it a try.
Copy link to clipboard
Copied
I'm confused again.
We found some Javascript code that does what we need in another area - buttons to print the current page, and open a window of a specific size, with no scrollbars, etc.
However, when we tried to add that code, RH kept rewriting it, putting in quotes, etc., then rejecting it for having errors.
I found the insert script option, which doesn't rewrite the code, but now can't figure out (or find out online - I looked, really!) how to associate that script with a link the user can click on. All I get is the little red box.
Can anyone help? Please?