no toolbar, statusbar and everything else

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

no toolbar, statusbar and everything else

Post 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>
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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();
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post 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:
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

for several months on Wednesdays has been around this yoda speak.

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