|
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).
|
|
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(); }
|
|
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?
|
|
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!
|
|