Jun 16, 2011, 3:56 PM
Jquery & Ext.NET
Hello.
I'm using a jQuery plugin (JCrop) to Crop a picture.
Given that I do not mind using <img, I have a problem not solved
As I can access the value of X (for example) from ext.Net, I just want to get those values to pass as an event paramentros ext.Net
Thank you very much and best regards
I'm using a jQuery plugin (JCrop) to Crop a picture.
jQuery(function ($) {
$('#image').Jcrop();
});
The thing is if I use ext:Image does not work <ext:Image ID="image" runat="server" />
But if I use img, if it works. <img id="image" />
There are some special way to access the ext components from jquery?Given that I do not mind using <img, I have a problem not solved
jQuery(document).ready(function() {
jQuery('#image').Jcrop({
onSelect: updateCoords
});
});
function updateCoords(c) {
jQuery('#X').val(c.x);
jQuery('#Y').val(c.y);
jQuery('#W').val(c.w);
jQuery('#H').val(c.h);
};
And are defined in:
<asp:HiddenField ID="X" runat="server" />
<asp:HiddenField ID="Y" runat="server" />
<asp:HiddenField ID="W" runat="server" />
<asp:HiddenField ID="H" runat="server" />
Use asp:HiddenField because it is not as updating the value of a ext:Hidden from jQuery. Could be done?As I can access the value of X (for example) from ext.Net, I just want to get those values to pass as an event paramentros ext.Net
<ext:Button runat="server" Text="CROP">
<DirectEvents>
<Click OnEvent="Crop_Click">
<ExtraParams>
<%-- <ext:Parameter Name="X" Value="#X" Mode="Raw"></ext:Parameter>--%>
<%-- <ext:Parameter Name="Y" Value="#Y" Mode="Raw"></ext:Parameter>--%>
<%-- <ext:Parameter Name="W" Value="#W" Mode="Raw"></ext:Parameter>--%>
<%-- <ext:Parameter Name="H" Value="#H" Mode="Raw"></ext:Parameter>--%>
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
Is that #X is not the way to do it, but it was to give an example ...Thank you very much and best regards