Ich verzweifle !!!
Welcher Java-Profi kann mir helfen !?
Ich benötige ein Java Skript zur automatisch Zentrierung bei jeder Bildschirmauflösung für ein Fullscreen Pop Up Fenster !
1.) Hier das Skript zur Pop Up Zentrierung:
<font color="red">
<script language="JavaScript">
function center_p(breite,hoehe,name,pfad,prop){
xpos=(screen.width-breite)/2;
ypos=(screen.height-hoehe)/2;
prop+=(prop!='')?',':'';
prop+=',left='+xpos+',top='+ypos;
window.open(pfad,name,prop+((prop!='')?',':'')+'width='+breite+',height='+hoehe);}
</script></HEAD>
<BODY>
<A HREF="#" onclick="center_p(300,300,'popup','harley.jpg','resizable=yes,scrollbars=yes, menubar=yes,toolbar=yes,location=yes,directories=yes,status=yes,')">popup</A>
</BODY>
</font>
Hier der 2.Skript zum FULLSCREEN Pop Up:
<font color="red">
<script>
function winopen() {
// Here resize the PopUp
var popUpSizeX=800;
var popUpSizeY=600;
// Here move it to any poiny on screen
var popUpLocationX=112;
var popUpLocationY=120;
// URL of the popUp
var popUpURL="layout1.htm";
splashWin = window.open("",'x','fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrolling=no,resizable=0');
splashWin.blur();
window.focus();
splashWin.resizeTo(popUpSizeX,popUpSizeY);
splashWin.moveTo(popUpLocationX,popUpLocationY);
splashWin.location=popUpURL;
splashWin.focus();
}
</script>
</head>
<body onclick="winopen()">
</body>
</font>
Ich habe jetzt schon Stunden verbracht um beide Skripts mit einander zu verbinden bzw. kombinieren um das gewünschte Resultat zu erreichen. Aber leider waren meine Versuche Alle nicht erfolgreich.
Welcher Profi von Euch kann mir die Lösung erarbeiten !?
MfG
Dirk