A
AllesMeins
Guest
Gibt es unter euch ein paar Javakönner (Ich gehöre definitiv nicht dazu
)? Ich habe da nämlich ein kleines Problem... ich habe mir dieses kleine Script zusammengebastelt (will heissen: Teile geklaut und dann zusammengepackt und etwas verändert
):
------------
<html>
<head>
</head>
<script language="javascript">
<!---
var bigpicWin = null;
function showbigimage(url, picwidth, picheight)
{
name = picwidth + picheight
if (picwidth>1020){
picwidth = 1020;
}
if (picheight>730){
picheight = 730;
}
name = picwidth + picheight
usrwidth = screen.width;
usrheight = screen.height;
winwidth = picwidth;
winheight = picheight;
var X = (usrwidth - winwidth) / 2;
var Y = (usrheight - winheight) / 2;
properties = "toolbar=no,location=no,directories=no,status=yes,resizable=no,copyhistory=no,width="+winwidth+",height="+winheight+",";
checkie = navigator.appName.indexOf("icrosoft");
if (checkie == -1)
{
properties = properties+"screenX="+X+",screenY="+Y;
}
else
{
properties = properties+"left="+X+",top="+Y;
}
bigpicWin = window.open('','_new',properties);
bigpicWin.document.open();
bigpicWin.document.write('<HTML><HEAD>');
bigpicWin.document.write('</HEAD>');
bigpicWin.document.write('<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0" BOTTOMMARGIN="0">');
bigpicWin.document.write('<A HREF="JavaScript:self.close()"><IMG SRC="'+url+'" HSPACE="0" VSPACE="0" BORDER="0"></A>');
bigpicWin.document.write('</BODY>');
bigpicWin.document.write('</HTML>');
bigpicWin.document.close()
bigpicWin.focus();
}
//--->
</script>
<body bgcolor="#666666" text="#000000" link="#000000" vlink="#000000" alink="#ff0000">
<center>
<a href="javascript:showbigimage('BILD.jpg','40','100')">BILD</a>
<p>
<small>
</body>
</html>
-------------------
Kann einer von euch mir helfen, dass Script so zu schreiben, dass es jedes mal, wenn ein Link angeklickt wird:
1) sich ein neues Fenster das, das passende Bild enthält öffnet
2) das alte Fenster erhalten bleibt
3) auch das neue Fenster die richtige grösse hat, sich also an das Bild anpasst...
Die bekomme ich einfach nicht hin. Ich hoffe einer von euch kann mir helfen...
------------
<html>
<head>
</head>
<script language="javascript">
<!---
var bigpicWin = null;
function showbigimage(url, picwidth, picheight)
{
name = picwidth + picheight
if (picwidth>1020){
picwidth = 1020;
}
if (picheight>730){
picheight = 730;
}
name = picwidth + picheight
usrwidth = screen.width;
usrheight = screen.height;
winwidth = picwidth;
winheight = picheight;
var X = (usrwidth - winwidth) / 2;
var Y = (usrheight - winheight) / 2;
properties = "toolbar=no,location=no,directories=no,status=yes,resizable=no,copyhistory=no,width="+winwidth+",height="+winheight+",";
checkie = navigator.appName.indexOf("icrosoft");
if (checkie == -1)
{
properties = properties+"screenX="+X+",screenY="+Y;
}
else
{
properties = properties+"left="+X+",top="+Y;
}
bigpicWin = window.open('','_new',properties);
bigpicWin.document.open();
bigpicWin.document.write('<HTML><HEAD>');
bigpicWin.document.write('</HEAD>');
bigpicWin.document.write('<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0" BOTTOMMARGIN="0">');
bigpicWin.document.write('<A HREF="JavaScript:self.close()"><IMG SRC="'+url+'" HSPACE="0" VSPACE="0" BORDER="0"></A>');
bigpicWin.document.write('</BODY>');
bigpicWin.document.write('</HTML>');
bigpicWin.document.close()
bigpicWin.focus();
}
//--->
</script>
<body bgcolor="#666666" text="#000000" link="#000000" vlink="#000000" alink="#ff0000">
<center>
<a href="javascript:showbigimage('BILD.jpg','40','100')">BILD</a>
<p>
<small>
</body>
</html>
-------------------
Kann einer von euch mir helfen, dass Script so zu schreiben, dass es jedes mal, wenn ein Link angeklickt wird:
1) sich ein neues Fenster das, das passende Bild enthält öffnet
2) das alte Fenster erhalten bleibt
3) auch das neue Fenster die richtige grösse hat, sich also an das Bild anpasst...
Die bekomme ich einfach nicht hin. Ich hoffe einer von euch kann mir helfen...