This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
coding for the "zoom image"

Could you please flesh out the instruction (besides replacing the image size and name of image)in the zoom coding? I have tried everything I can think of to make it work and I even had my son (web designer) look at it too and he got the same results. The image shows up but there is absolutely NO action (no zoooooom). Just sits there and looks at me-ha.
Thank you for your help.

Browser: firefox

OS: windows vista

Re: coding for the "zoom image"

Where do you have the zoom coding implemented? I see the zoom script on your "For Sale" page but I don't see any implementation. You need to do more than just add the script.

The script originally comes from Javascriptkit.com - Cut & Paste Image zoom in/out. Their explanation is a little bit better, but not much. But the script, when implemented properly does work.

First, here is an example of the script with two images, Image zoom Test. It seems to work fine but when you zoom the image on top, it goes over the zoom controls for the image below it, but than under the image. I'm sure all that could be worked out, but that really wasn't the point of this exercise.

The next example is a copy of your "For Sale" page, with the script implemented, To Sell - Image zoom Test. It's not a full PHP implementation of your page, but it's sufficient. Scroll down to the image of the Stones Ticket and notice the Zoom-In/Zoom-Out links. When you move your mouse over the links, the image changes in size. You can view the code, for either example, to see how I implemented it.

What may be a little difficult to see, is the change I made so that it would work in Firefox. Places like Javascriptkit and DynamicDrive are very sloppy about the code they publish. And, Bravenet doesn't fix it when they publish the same code. To make this script work in both Firefox and IE I had to make some adjustments. It seems that there is a odd bug in Firefox that requires you to also include the unit of measure when you're dynamically changing the width in Javascript. For example, specifying a width change like the following doesn't work.

Code:
document.getElementById('mydiv').style.width= 400;


But the code below does.

Code:
document.getElementById('mydiv').style.width= '400px';


Even though you can fix it in the Javascript this is really a CSS error. You can also force this to work by changing your DOCTYPE tag to reference HTML 4.0 rather than 4.01, but that's probably better left alone. If you look at the code for my first example, Image zoom Test, you should be able to see the changes I made to the Javascript.

Browser: Firefox, Netscape, Sea Monkey, Internet Explorer, .....

OS: Solaris (Sparc,x86), Linux, XP

Re: coding for the "zoom image"

Simply stated-You Are a Genius!! Give yourself a raise.
Thank you very much-I can breath again.

Browser: firefox

OS: windows vista

Re: coding for the "zoom image"

hollymaren
Give yourself a raise.


Thanks!! I gave myself a 10 percent raise. However, it seems that 10 percent of nothing is still nothing.

Good luck with your work.

Browser: Firefox, Netscape, Sea Monkey, Internet Explorer, .....

OS: Solaris (Sparc,x86), Linux, XP