Here is the code for open_center();
// opens a new window in the middle of the screen without buttons and bars
//-------------------------------------------------------------------------------------------------------
function open_center(url,width_,height_,scrollbar,toolbar,menubar,jump) {
The function has seven parameters but you only pass it three. Here is
a version of open_center that fills in the missing parameters.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Invoke a popup</title>
<script type="text/javascript">
function open_center(url,width_,height_,scrollbar,toolbar,menubar,jump)
{
if( typeof scrollbar == "undefined" )
{ scrollbar = "yes";}
if( typeof toolbar == "undefined" )
{ toolbar = "yes";}
if( typeof menubar == "undefined" )
{ menubar = "yes";}
if( typeof jump == "undefined" )
{ jump = " ";}
alert("scrollbar = " + scrollbar +
" toolbar = " + toolbar +
" menubar = " + menubar +
" jump = " + jump );
var H_Browserrand = 12;
var V_Browserrand = 30;
var H_Aufloesung = screen.availWidth;
var V_Aufloesung = screen.availHeight;
var H_Fenstergr = H_Aufloesung-H_Browserrand;
var V_Fenstergr = V_Aufloesung-V_Browserrand;
// You are settting glabal variables here.
Fensterbreite = width_;
Fensterhoehe = height_;
H_offset= (H_Fenstergr-Fensterbreite)/2;
V_offset= (V_Fenstergr-Fensterhoehe)/2;
// maybe the client has a smaller resulution than the image?
if (V_Fenstergr < Fensterhoehe){
V_offset = 0;
Fensterhoehe = V_Fenstergr;
vlimit= V_Fenstergr;
}
else{
vlimit = 0;
}
var popup =
window.open(url+'&vlimit='+vlimit+'#'+jump,'Detail',
'width='+Fensterbreite+
',height='+Fensterhoehe+
',left='+H_offset+
',top='+V_offset+
', resizable=no,scrollbars='+scrollbar+
',toolbar='+toolbar+
',status=no,directories=no,menubar='+menubar+',location=no')
popup.focus();
return popup;
};
</script>
<BODY>
<p>Let's see if we can pop something up...
<a href="#"
onclick=
"open_center('
http://www.yahoo.com?',
475,
500); return false;"
onMouseOver="status='display profile'; return true;"
onMouseOut="status='';" title="display profile">click here</a>
</body>
</html>
You are setting two global variables. Did you want too? See my
comment in the code.
The page in action can be viewed here (click on a picture to see the problem):
http://www.globosapiens.net/travel-information/Nice-1172.html
This is a nice and informative site. It is professionally done with a
lot of thought put into it. You are best advised to contact the
programming team who wrote the site and inquire why you are
experiencing difficulties with the page.
Robert