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

Editing HTML affects Browsing

Participant ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

In the FAQ of help-info.de I find the following:

-----------------------------------------------------------------------------------------------
Q: Is there a way to specify that as soon as a page loads in the "main" window of the CHM viewer, I should be able to immediately use the PgUp, PgDn, Up-Arrow or Down-Arrow keys on the keyboard, without having to first click the mouse arrow somewhere in the "main" window?

A: You need to set the focus to the page in which you want to scroll, by changing its BODY start-tag to this:
<body onLoad="self.focus()">
-----------------------------------------------------------------------------------------------

A quick check shows that it works, and we have had complaints from users about always having to click to move the focus, so it sounds like a good idea for us.

But I have always heard that it is a bad idea to touch the HTML when using a WYSIWYG editor; is this edit safe and/or stable (that is, will RoboHelp crash and/or silently undo it one day)?

We run RoboHelp 7.02.001 under Windows XP.

Views

750

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
Advisor ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

<body onload can be edited in the TrueCode mode without breaking anything (assuming, of course, you do it right!).

By the way, best practice for any edits in the TrueCode is to Save your changes before you return to WYSIWYG mode.


Good luck,
Leon

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
Participant ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

Thanks for the reassurance Leon; but I thought about it last night and I realize that I shall have to make the change to every topic. Do you think it will be safe using RoboHelp's Multi-File-Find-and-Replace? or should I use another tool?

Going even further, is there any way I can have the modified <body> tag automagically included in newly created topics?

--- Derek

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
Advisor ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

Keep in mind that the RH MFF&R does not deal with line breaks, tabs, or multiple spaces.

Given that, if your topics are all currently holding <body> only, RH can handle this type of replacement.

For anything more complex (see above), get FAR (shareware) or BK ReplaceEm (freeware), both endorsed by many forum members (I'm partial to FAR, myself).


Good luck,
Leon

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
Valorous Hero ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

Hi Derek and Leon

Here's a couple of ideas that might work.

1. Create a topic template. Inside the template, place some JavaScript. I tried a script that looks like below and it seems to work.

<script>document.focus();</script>

I inserted this script just above the closing Body tag like this:

<script>document.focus();</script>
</body>

Or, 2. You might insert the same type of script in a footer attached to a topic template. Then apply the footer to all existing topics to propagate 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
Participant ,
Jul 29, 2008 Jul 29, 2008

Copy link to clipboard

Copied

Hi again,

I tried editing my project using MFFAR, changing <body> to <body onLoad="self.focus()">. That went fine, and the focus was as desired. But my Browse Sequences had disappeared. I tried the usual things, but that didn't help. I reversed the edit (that is, in MFFAR I changed <body onLoad="self.focus()"> to <body>) and my Browse Sequences came back.

Does anybody have suggestions to help me?

--- Derek

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
Participant ,
Jul 30, 2008 Jul 30, 2008

Copy link to clipboard

Copied

LATEST
The problem seems to be the Default Topic specified in the SSL, which is the home page of my CHM. If that topic contains the 'magic' tag <body onLoad="self.focus()"> then I have no Browse Sequences; if it contains a plain <body> tag then I have Browse Sequences. I now have the 'magic' tag in all other topics of my project, and all seems to be OK.

But I still don't understand what is going on; can anyone enlighten me?

--- Derek

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
Advisor ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Duplicate post...ignore.

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