Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

Javascript with php variables for image sizing popup

Javascript coding ..

Moderators: macek, egami, gesf

Javascript with php variables for image sizing popup

Postby Skyweb » Fri Dec 19, 2003 12:35 am

Hello everyone.

I got a PHP Javascript problem.

This code actually works poping up the images but the size of the image doesnt display
fully in it.

I took out part of the code to make it more readable.

My questions is.
What is wrong in this code as I said that the images do not popup with the image size that
is being read by php script.


Thanks for any help with this and best regards,

Sky
Code: Select all
Image size reading!

 @$getsize = getimagesize("$getimagelink");
        @$imagew = $getsize[0];
        @$imageh = $getsize[1];

JavaScript using the php variables in it!

    <script language="JavaScript">
        function pop(URL) {
                var windoww = window.open(URL,"","width=<? echo $imagew; ?>","height=<? echo $imageh; ?>"," toolbars=0","scrollbars=0","left=0","top=0","statusbar=0","location=0","menubar=0","resizable=0")
        windoww.focus()
        }
        </script>

The line with the pop code from javascript!

echo "<td width=\"20%\" style=\"border-bottom: 1px solid #FF0000;\"><center><a href=\"javascript:pop('$getimagelink','$imageh','$imagew')\" ><img border=\"1\" src=\"admin/$que_tabla/$imagen.jpg\" width=\"140\" height=\"88\"></a></center></td>";
Skyweb
New php-forum User
New php-forum User
 
Posts: 16
Joined: Tue Nov 18, 2003 1:18 am

Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron