Page 1 of 1

no toolbar, statusbar and everything else

Posted: Wed Jun 01, 2005 12:00 pm
by ddragas
Hi all

I'm nb in js so please help me

What I wont is to open window with image in it with no toolbar, statusbar and everything else - just image, but I'm stuck

Here is complete code

Code: Select all

<?php  

$image_to_convert = $_GET['filename'];

$the_image_path = $image_to_convert;
$file_type = strtolower(strrchr($the_image_path,"."));

switch ($file_type) {
case ".JPEG":

    	$slika1 = imagecreatefromjpeg($image_to_convert);
   break;
case ".JPG":

    	$slika1 = imagecreatefromjpeg($image_to_convert);
   break;
case ".jpeg":

    	$slika1 = imagecreatefromjpeg($image_to_convert);
   break;
case ".jpg":

    	$slika1 = imagecreatefromjpeg($image_to_convert);
   break;
case ".PNG":

    	$slika1 = imagecreatefrompng($image_to_convert);
   break;
case ".png":

    	$slika1 = imagecreatefrompng($image_to_convert);
   break;
}


$slika = $image_to_convert;//"../watermark/DSCF3127.JPG"; //original picture

$size = getimagesize($slika); 
    $width = $size[0];
    $height = $size[1];


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>Untitled Document21121</title>

<SCRIPT LANUAGE="JavaScript 1.2">
<!--
function RSto() {
window.resizeTo(<? echo $width; ?>,<? echo $height; ?>)
}
//-->
</script>


</head>

<body  onload="RSto()">
<?
echo "<img src=" . $image_to_convert . ">";
?>

</body>
</html>

Posted: Wed Jun 01, 2005 12:06 pm
by Burrito
use window.open with the height and width ONLY for the third argument you should.

open a new window without the address bar etc it will.

ex:

Code: Select all

var bob = window.open('file.php','varname','width=400,height=400');
bob.focus();

Posted: Wed Jun 01, 2005 12:32 pm
by wwwapu
Burrito wrote:use window.open with the height and width ONLY for the third argument you should.
open a new window without the address bar etc it will.
Somebody too much Star Wars watching has been, guess I :lol:

Posted: Wed Jun 01, 2005 12:34 pm
by Burrito
for several months on Wednesdays has been around this yoda speak.

quite catchy it is...try it you should :P