Jump to content

Recommended Posts

I have a piece of code that takes a db value for an images location and displays it in another window. It works fine but the image is being scaled down, I want it to be viewed full size.

 

Here is the code:

 

   echo "<a href=\"menus/$menuView\" target=\"_blank\">VIEW</a>";
   echo "<img src=\"images/window.jpg\" alt=\"View takeaway food menu\"> view menu<br/>";

 

I presume I have to get the images height and width attribs but the problem is every image is a different size.

 

Hope you can help me.

 

Many thanks in advance

VoodooJai

I guess the image is being scaled by the browser. Clicking the image should show it's actual size. That's a browser behavior.

 

That is what is happening I have been trying the "getimagesize" function but as you say its the browser thats taking over the dimensions, can it be overidden.

 

 

I guess the image is being scaled by the browser. Clicking the image should show it's actual size. That's a browser behavior.

 

That is what is happening I have been trying the "getimagesize" function but as you say its the browser thats taking over the dimensions, can it be overidden.

 

 

The browser should have a way to "zoom" (really just making normal dimensions).  In FF, you just put your mouse over it an a magnifying glass appears, so you click.  In IE, I think you hold the mouse over it for several seconds and then a box appears in the top-right for you to click.

Displaying the image in an html page will display it right. Displaying the image in the browser without the proper html formatting will display it resized. If you want to override the behavior, make html pages for each image.

 

EDIT: DarkWater beat me to it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.