Welcome Guest Search | Active Topics | Sign In | Register

ImageZoom Options
swabygw
Posted: Thursday, August 20, 2009 8:43:26 PM
Rank: Member
Groups: Member

Joined: 8/11/2009
Posts: 14
Here's the javascript:

function doZoomIn(objectname)
{
obj = document.getElementById(objectname);
eo_GetObject(obj).zoomIn;
}

This errors on the second line. Probably because "eo_GetObject" is not valid javascript syntax. What is my function missing? Is there some other control/script I need to have on this page? (I saw your online demos, but your javascript is hidden).
swabygw
Posted: Thursday, August 20, 2009 8:45:33 PM
Rank: Member
Groups: Member

Joined: 8/11/2009
Posts: 14
Never mind, found problem:

function doZoomIn(objectname)
{
//obj = document.getElementById(objectname);
eo_GetObject(objectname).zoomIn();
}
swabygw
Posted: Thursday, August 20, 2009 9:15:07 PM
Rank: Member
Groups: Member

Joined: 8/11/2009
Posts: 14
But, I did have one more question. Is it possible to know the name of the "zoom"ed object so I can, for example, change the souce of the image dynamically? For example,

obj = document.getElementById('zoomed_image_object?');
obj.src = 'new_image.jpg';

What would "zoomed_image_object" be after it's created?
eo_support
Posted: Thursday, August 20, 2009 9:25:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I don't think you can do that. The ImageZoom control automatically switches between "small image" and "big image". So even if you are able to change the img element's src, the next time user zooms in/zooms out the image will be reset.

You can certainly use the control along with AJAX to update the image Url on the server side though.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.