
Chen Jun Ying
Top achievements
Rank 1
Chen Jun Ying
asked on 24 Feb 2012, 07:33 AM
var imEditor = null;
function GetEditor() {
if (!imEditor)
imEditor = $find("<%=imgEditor.ClientID %>");
return imEditor;
}
function Zoom() {
var $ = $telerik.$;
GetEditor().zoomImage(50);
}
I use above code block to zoom the image during page load. In which stage I should fire the script? I tried it in page prerender and imageeditor prerender but both are not working. the issue is imgEditor can not be found.
6 Answers, 1 is accepted
0
Hello,
You can use the OnClientLoad client-side event of RadImageEditor to zoom the image, e.g.
All the best,
Rumen
the Telerik team
You can use the OnClientLoad client-side event of RadImageEditor to zoom the image, e.g.
<telerik:RadImageEditor OnClientLoad=
"OnClientLoad"
ID=
"RIE1"
runat=
"server"
ImageUrl=
"~/Images/bird.jpg"
></telerik:RadImageEditor>
<script type=
"text/javascript"
>
function
OnClientLoad(sender) {
sender.zoomImage(50);
}
</script>
All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Chen Jun Ying
Top achievements
Rank 1
answered on 28 Feb 2012, 04:36 AM
Thanks Rumen.
The scripts works when page loads in the first time.
My scenario is that I have a button on the page to save any image change (rotation and etc.). The image editor just stopped working after postback. You can not even zoom in/out the images.
Any ideas?
I also raised another thread http://www.telerik.com/community/forums/aspnet-ajax/image-editor/image-is-not-saved-after-rotation.aspx
The image didn't get saved in most of the time. Is it because ImageEditor caches the image?
Thanks
The scripts works when page loads in the first time.
My scenario is that I have a button on the page to save any image change (rotation and etc.). The image editor just stopped working after postback. You can not even zoom in/out the images.
Any ideas?
I also raised another thread http://www.telerik.com/community/forums/aspnet-ajax/image-editor/image-is-not-saved-after-rotation.aspx
The image didn't get saved in most of the time. Is it because ImageEditor caches the image?
Thanks
0
Hi Chen,
I am not quite sure what may be causing the problem that you experience. A possible reason for such behavior may be a JavaScript error thrown on the page during the page load preventing proper initialization of the control.
However, I believe we are missing the root of the problem. Could you please provide more detailed information on the specific scenario? What exactly you are trying to achieve?
Regards,
Dobromir
the Telerik team
I am not quite sure what may be causing the problem that you experience. A possible reason for such behavior may be a JavaScript error thrown on the page during the page load preventing proper initialization of the control.
However, I believe we are missing the root of the problem. Could you please provide more detailed information on the specific scenario? What exactly you are trying to achieve?
Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Chen Jun Ying
Top achievements
Rank 1
answered on 02 Mar 2012, 01:21 PM
The issue is resolved after I use the client side function to force the change you proposed on the other thread.
Thanks for your help.
Thanks for your help.
0

DogBizPro
Top achievements
Rank 1
answered on 12 Aug 2015, 04:37 PM
I tried this code and it skews the image and doesn't just change the zoom. If I use the toolbar to get to 50% zoom it looks fine. If I use this code the picture proportions are way off.
0
Hello Stephanie,
I have already answered your other thread on the subject, please, refer my answer here: http://www.telerik.com/forums/zoom-not-working
Regards,
Vessy
Telerik
I have already answered your other thread on the subject, please, refer my answer here: http://www.telerik.com/forums/zoom-not-working
Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items