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

Resizing the help window when clicking "Show"

New Here ,
Oct 03, 2006 Oct 03, 2006

Copy link to clipboard

Copied

I have a WebHelp project (RH X5) with some page-level help topics. When the user clicks "Show" in a topic to open the full help system with navigation framework, I'd like the window to be resized (enlarged, specifically). Does anyone know how to accomplish this? I'm fairly certain I'll have to edit generated files (probably whtopic.js), which doesn't thrill me, but I can't tell where/how to do this.

Views

732

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
Engaged ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

Bump.

I'd like to know, too.

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 ,
Oct 17, 2006 Oct 17, 2006

Copy link to clipboard

Copied

LATEST
What I ended up doing was adding the following JavaScript below the head tags in the file index.html (which is the name of my start page):

<script language="JavaScript1.2">
<!--
if (document.all) {
top.window.resizeTo(600,600);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = 600;
top.window.outerWidth = 600;
}
}
//-->
</script>

This ensures that when users click the "Show Table of Contents" link on a context-sensitive help topic, the full help set opens in the specified window size. Because the JavaScript is placed in the generated file index.html, I have to reinsert it each time I publish WebHelp. I'd rather be able to accomplish this in a source file, but....

You could also indicate the coordinates of the window by placing the following line right after the start comment tag:

top.window.moveTo(100,100);

[where you replace (100,100) with the x,y coordinates you want].

I found this on the Web, but I've already forgotten where.

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 ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

Why aren't you opening the full help system for your users, instead of forcing them to click the Show link?

The call from the application should be to your start page first, then the related CSH page (Start_page.htm#screen_name.htm).


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
Engaged ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

Leon, in my case it's because the user is already in a specially-constucted, context-sensitive topic. Without going into a bunch of detail, let's just say that it makes sense in our application to do it this way.

Appreciate your thoughts on opening the original topic with toc. Do you have any suggestions on the original question as stated?

G

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
Enthusiast ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

In whtopic.js,

note the insertion of

window.resizeTo(nnn,nnn);

Try it!

Harvey


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
Engaged ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

Harvey, thank you, that's terrific! I modified the line a bit, because my original window is located at the top right of the screen. The following compensates for the new size, plus offsets it vertically a bit. Don't know if I'll keep the vertical offset or not, but that's no biggie. Here's what I ended up with:

else if(sType=="show")
{
if(isTopicOnly()&&(!gbOpera6||gbOpera7))
{
var sTitle="Show Navigation Component";
goShow=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
sButton="<a title=\""+sTitle+"\" class=\"whtbtnshow\" href=\"javascript:void(0);\" onclick=\"window.resizeTo(800,600);window.moveTo(200,20); show();return false;\">";

This will definitely improve how things work. Thanks again.

G

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
Enthusiast ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

G,

You may want to get some user reaction to this.

Suppose I have adjusted the sizes and positions of the open windows, including WebHelp, to see the application and help at the same time.

Now I want to see the TOC, and -- POW! -- there it goes back.

I'd be annoyed, but maybe your users don't work with more than one window open.

Harvey

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
Engaged ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

Given our most common usage scenario, I think that it's stil a net gain, even if the situation you describe does happen occasionally. But you're right, of course - it does warrant testing. Fortunately, we have a chance to give the idea a little run time before committing.

G

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