4 Replies Latest reply on Oct 29, 2006 1:04 PM by kewal_tech

    Window size and TOC

    kewal_tech Level 1
      Hi

      Working in RH HTML,
      Generating webhelp and webhelp pro manuals.

      I want to restrict the size of my help window

      1. I am able to define a custom default window for webhelp/pro to use, and also able to default my custom window for output in Webhelp/pro layout properties. But the help file output is in my default browser size.

      2. To over come the above I also wrote few commands in the template(this is a custom template which has got company header and footer created in RH HTML).

      Command 1. <body onload=self.resizeTo(600,500);self.moveTo(300,200) > or <body onLoad = resizeTo(600,500) - None of this worked

      Command 2. <script>window.resizeTo(600,700);window.resizable=0</script> - This didnt work also

      NOTE: I used both Command 1 and 2 turn by turn.

      3. Any changes to the template, should effect all topics using it as a template?If I write a code in the template it should effect all topics?

      4. TOC - Is it possible to restrict the a user not to change the size of the TOC pane?

      Thx for your help

      Kewal
        • 1. Re: Window size and TOC
          Peter Grainge Adobe Community Professional (Moderator)
          The window size is covered in the March 2004 Scry on Robowizard's site.

          I don't think you can stop the user changing the TOC size. If you can, it will be in one of Rick's other downloads.

          • 2. Re: Window size and TOC
            kewal_tech Level 1

            Hi,
            Thx for your reply.

            I did get the below code regarding resizing the window. So now I've placed this code in template which all my Topics inherit. Doing this it is still using the default size rather then following the below code.

            Code From http://www.robowizard.com/RoboWizard/NewProject.htm#MonthlyScry/032004.htm

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

            Am I doing the correct thing by entering the above code in the template's TrueCode? If not please tell where do I need to enter this code?


            Thank you

            Kewal

            Have a great weekend
            • 3. Re: Window size and TOC
              Peter Grainge Adobe Community Professional (Moderator)
              Rick's topic tells you where to place the code. Looks like the code you quote is something you add to the startpage in the output. Take another look at Rick's topic. If you back up your project, you can't do any harm, unless you try extra hard!

              • 4. Re: Window size and TOC
                kewal_tech Level 1
                Hi,
                Thx for your reply

                I used Rick's code to change the size of my window, but I had to call in a different way I was not able to define the size in the body, I dont know why this didnt just work. So I did the below.

                I used the code for the below from Rick's site but I declared the function in the HEAD.

                <script language=JavaScript1.2>
                function Resize ()
                {
                top.window.moveTo(0,0);
                if (document.all) {
                top.window.resizeTo(1000,700);
                }
                else if (document.layers||document.getElementById) {
                if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
                top.window.outerHeight = 700;
                top.window.outerWidth = 600;
                }
                }
                }

                </script>

                after declaring the above function I called it in the <body onLoad=Resize() >
                and this worked. Finally my help opened in a defined size.

                Code from - http://www.robowizard.com/RoboWizard/NewProject.htm#MonthlyScry/032004.htm


                Thank you for your help and advice much appreciated
                Thx to rick for his code

                Kewal

                Have a great Monday ;-)