ZBrushCentral

Web page code question...

I’m using Dreamweaver to set up a new website. I’m looking for a way to resize an image through code (I guess Javascript or something?) The basic idea is to click on a text link, have an Image resize to the appropriate size, and display a different image. I’ve got all of that except for the resizing bit. Any suggestions? :slight_smile:

<IMG SRC=“BLAH.jpg” HEIGHT=“361” WIDTH=“251”>
adjust the # numbers as needed and change the BLAH.JPG to your pic name

For best picture quality I would avoid resizing an image in the HTML if I were you. If you shrink or particulaly stretch the image it won’t look as good.

It is better to resize the image using proper image processing software and then download the correctly sized image. You may even save significant download time if the original was much bigger.

TTFN

Prunesquallor

Thanks for the tips guys, but I think maybe I didn’t make myself clear. I’m not actually resizing the images themselves, I need to rezise the container they are in. So I have one image on the page, and by clicking the link, the source of the image changes to a different picture. Unfortunatly after doing this the image box’s size doesn’t change; this is what I need to fix. :slight_smile:

<A HREF=“BLAH.jpg”>
<IMG SRC=“BLAH.jpg” HEIGHT=“50” WIDTH=“65”>
</A>
Clickable image one to another.
need to rezise the container what is a container

Is the image being placed in a frame, or a table cell?

In Dreamweaver, you need to first determine the largest size of the image that will be contained within the space. Then you need to specify slightly larger than that as the cell or frame size.

Using straight HTML, there is no good way to make the a portion of the page dynamically resize itself based on the contents of the cell/frame. But by making the “container” fixed to fit the largest image size, then there is no need to resize for smaller images.

It really sounds like for your purposes, the best approach would be through frames. You can set the image area to be one frame, and then create a bunch of pages for the images – one page per image. When the user clicks on the link, it targets the image frame, which loads the appropriate image without having to reload the entire page each time.

do you want the page IE to resize or the image?
here is a sample of drag resize http://javascript.internet.com/miscellaneous/image-resizer-drag-and-drop.html

Thanks for all the help everyone. EZ, that Javascript site has a lot of great info, and I think I see (from that site) how to accomplish this. (LOL- can anyone tell I’m not very experienced with web pages? ;))

sorry i never used Dreamweaver but i have herd of it and it seams like a web builder.
i usley do all my stuff by hand im sure you seen my webpage at brinkster which to me is amauture stuff to me but enough to put up some stuff.
if you care to re explain a little bit better or more clear im sure i could help you.
i would stay away from frame because some browser don’t support it or free website’s

I’m begining to wonder if I’m going to continue to use Dreamweaver myself, EZ. I decided to learn the basics of HTML today, and I’m much happier doing hand coding. Oddly, it’s easier for me to get what’s in my mind. :slight_smile:

Hand coding is easier while you are learning, and helps you retain more of what you’ve learned. Once you know what you are doing, Dreamwever is a wonderful tool to make the whole process quicker and less error prone. Besides, you can hand code in Dreamweaver as well.

Muvlo,

Well it won’t work here. I’ll be back with a link to a page on my site for you.

I don’t have Netscape loaded anymore so I can’t check it with that. There are two examples. One just the thumbnail to click on which you could put plain text under and the other has both the capability of clicking on the thumb or on a text link below.

Link removed. Problem seems to be solved. :smiley:

Just switch the path of my images to your paths and be sure that Dreamweaver or whatever you are using doesn’t force images sizes. If it adds a width and height use Notepad to remove them. :smiley:

Works for me here with IE6…I don’t know how compatible it is because I don’t have anything else to test with. My guess is it might give netscape and some earlier version browsers headaches.

Never stopped to consider you might want to convert the image back down to smaller. :smiley: Hmmm, don’t know if I can figure that out or not. I’ll try and see.

here you go, right up your alley.
about every thing you can think of when using a image http://webdeveloper.earthweb.com/webjs/jsimage
when you find some thing you might like chose > run this code.
it has alot of pages to look threw just not one.
here is a neat one but not what you want lol http://webdeveloper.earthweb.com/repository/javascripts/2002/01/72121/Pacman.html move your curser in it

Hey EZ! cool links.

I can do mouseover and mouseout easy enough…but it’s the onclick that Muvlo was talking about that’s a little tough. I can get the image to enlarge but I think I need to re-think the code to get it to go back to the original size on clicking.

Muvlo,

If you want just when someone mouses over a link or an image. That works well and is easy to code. :smiley:

Added the mouse over and mouse out to the page linked above. If you choose to do it that way let me know and I’ll email you the pre-load part of the script so it won’t take your images so long to change when mousing over and mousing out. :smiley:

Muvlo…

If you can clearly define what you’re looking to do, I know I can help you get there. I’m very familiar with most of what’s been described above.

My main question (so far) is what you want to happen when the user clicks on the image and/or link.

Do you want to toggle between 2 images which are a different size? Or are you going to go through a list of images (kind of like a “next” button)?

Take a look at this! -->Image Swap and Preload<–

Seems to work pretty well! :smiley:

auh ha know i see what you want.
go here http://www.angelfire.com/wizard/null/resize.cgi
same thing but better :+1:

Don’t use those web builder things. By hand is always the better way to do it. And its just as easy if not easier.

David