Variablen

Sebastian Wramba

Erfahrenes Mitglied
Ich wollte mein Chromeless-Window in Vollbild öffnen und hab dazu mal folgendes modifiziert, nur es geht leider nicht. Ich bin halt absoluter JS-n00b.

Hier das Script:
Code:
<script>
var width = screen.availWidth;
var height = screen.availHeight;

function openIT() {
	theURL="core/index.php"
	wname ="index"
	W="+width+";
	H="+height+";
	windowCERRARa 		= "close_a.gif"
	windowCERRARd 		= "close_d.gif"
	windowCERRARo 		= "close_o.gif"
	windowNONEgrf 		= "none.gif"
	windowCLOCK		= "clock.gif"
	windowREALtit		= ".:..: g-o-stylez"
	windowTIT 	    	= "<font face=verdana size=1>g-o-stylez</font>"
	windowBORDERCOLOR   	= "#FFFFFF"
	windowBORDERCOLORsel	= "#FFFFFF"
	windowTITBGCOLOR    	= "#FFFFFF"
	windowTITBGCOLORsel 	= "#FFFFFF"
	openchromeless(theURL, wname, W, H, windowCERRARa,
                       windowCERRARd, windowCERRARo,
                       windowNONEgrf, windowCLOCK, windowTIT,
                       windowREALtit,windowBORDERCOLOR,
                       windowBORDERCOLORsel, windowTITBGCOLOR,
                       windowTITBGCOLORsel)
}
</script>

Das Fenster wird einfach viel zu klein. Hier sehr schön zu sehen.
 
probier mal anstatt screen.availWidth und screen.availHeight einfach nur screen.Width und screen.Height

sollte funktionieren ;)


Dunsti
 
Wie bau ich die Variablen in der Zeile ein?

Code:
onload="javascript:openIT('core/index.php','+width','+height+',null,null,'Home',0,true,true,true);"

Das klappt so nicht. Außerdem hat Klon (meister der Programmierung :) ) screen.availWidth bei den Webmaster-Tutorials angegeben.

So hab ich die festgelegt:

Code:
<script language="javascript" type="text/javascript">
var width = screen.Width;
var height = screen.Height;
</script>
 

Neue Beiträge

Zurück