Quantcast
Channel: Adobe Community : Popular Discussions - RoboHelp
Viewing all articles
Browse latest Browse all 42510

Opening a browser window from a CHM (Win7)

$
0
0

Hi All,

 

I'm having a problem where a script we've had for years to open a special window (sized, no browser buttons, etc) for certain content is no longer working correctly in Windows 7.

 

Here is the script:

function OpenWindowSize(strUrl, u_width, u_height) {
var w_width = ",width=" + u_width;
var w_height = ",height=" + u_height;
var strOptions = "scrollbars=yes,resizable=yes"
strOptions += w_width;
strOptions += w_height;
strOptions += ";";
var newWin = window.open(strUrl, "newWin", strOptions);
//     newWin.document.close();
  newWin.focus();
}

 

WinXP & Vista: a link within a CHM correctly opens a new window with only scroll bars, and resizable, with the specified dimensions (e.g. u_width=500, u_height=700)

 

Win7: a link opens in a regular browser window with full menus, etc and not sized to the specified dimensions. An error also displays in the CHM file.

 

CHM error message (snippet): 'newWin' is null or not an object.

 

A developer managed to get the CHM error to go away by adding if (newWin != null) above the focus() line.

 

He also managed to prove that the problem only exists within CHMs. When the same javascript is used in plain HTML, the window is called correctly, as per the WinXP & Vista example above.

 

Does anyone know how to get my script working in Win7 so that it is sized correctly and doesn't have the menus/buttons?

 

 

Thanks,

Amber


Viewing all articles
Browse latest Browse all 42510


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>