Copy link to clipboard
Copied
I'm using RoboHelp 8 to develop a WebHelp for a Web-based application. When the help is launched from the application, it covers the entire screen.
How can I make it so the WebHelp only displays in a smaller browser window so it does not cover the entire screen?
Thanks in advance for your help 🙂
Copy link to clipboard
Copied
I think that's controlled by the launching program - what method are you using to launch the help?
Copy link to clipboard
Copied
The Help is being called from a link on an ASP page. Do you know how to manage windows size for the help?
Thanks!
Copy link to clipboard
Copied
An ASP page is essentially HTML, so you should be able to use JavaScript to do this.
You have 3 options for inserting the JavaScript in your page:
Examples of each:
Example 1: Inline
Here's an example of an line usage on an <a> link. Replace "project_folder/file_to_launch.htm" with your own URL (either absolute: http://www... or relative: ../my_folder/my_project_launch_file.htm).
<a href="javascript:void('0')" onclick="window.open('project_folder/file_to_launch.htm','','height=500, width=800, left=100, top=100, toolbar=no, menubar=no, resizable=yes, scrollbars=yes')">My Project</a>
Example 2: In a <script> Element
I put this in the <head> of my page:
<script language="javascript">
function openWindow(filename){
var filename = filename;
myWindow=window.open(filename,"","height=500, width=800, left=100, top=100, toolbar=no, menubar=no, resizable=yes, scrollbars=yes");
}
</script>
Example 3: External File
The following line in the <head> of the page imports the script defined in the "../resources/launchWebhelp.js" file (obviously, your path and filename will differ).
<script language="javascript" src="../resources/launchWebhelp.js"></script>
The definition in the external file is the same as example 2, but without the <script> tags.
In both examples 2 and 3, I would call the openWindow( ) function the same way:
<a href="javascript:void('0')" onclick="openWindow('project_folder/file_to_launch.htm')">My Project</a>
------------------------------------------------------------------------
I use this technique for a couple of reasons:
I fully expect the user to resize or maximize the new window...my content is not optimized to appear within the confines of the smaller window.
This technique is using the open( ) method associated with the "window" object of the browser. Here's a link with some information about this method:
http://www.w3schools.com/jsref/met_win_open.asp
I hope this helps you out.
Dave
Copy link to clipboard
Copied
I use a JavaScript function to accomplish something similar:
function launchWebhelp(filename){
var filename = filename;
myWindow=window.open(filename,"","height=500, width=800, left=100, top=100, toolbar=no, menubar=no, resizable=yes, scrollbars=yes");
}
The above opens a new browser window with the dimensions 500x800 and allows the user to resize it.
In my link, I call it like this:
<a href="javascript:void('0')"onclick="launchWebhelp('http://www.serverName.com/webhelp/project_name.htm')">Project Name</a>
with the URL pointing at the file used to launch the webhelp. This exact approach may not work for your application (depending on how the help is launched), but hopefully it gives you (or your developer) an idea.
Dave