Dec 19, 2011, 9:41 PM
Call JavaScript function with an Event in Ext.net
Hellow an thanks for your help. I'm using javascript in my proyect, but now i'm ussing Ext.net but i don't know how i can launch this function with an ext button.
This is the function:
Thanks, and sorry, my english isn't very good.
This is the function:
function cancel_button(e)
{
graph.newElement = null;
graph.newConnection = null;
graph.track = false;
for (var i = 0; i < graph.elements.length; i++)
{
var element = graph.elements[i];
if (element.tracker !== null)
{
element.tracker.track = false;
}
}
graph.update();
graph.updateActiveObject(graph.pointerPosition);
graph.updateMouseCursor();
graph.stopEvent(e);
};
This is how i use it, from an HTML form:<input type="button" id="btnDelete" name="btnDelete" title="Borrar [Del]" class="button_delete" accesskey="-" tabindex="5" onclick="delete_button(event)" />
I'm tying with Ext.net, but i dont know hoy i can send the "event":<ext:Button ID="btnDelete" runat="server" IconCls="button_delete">
<ToolTips>
<ext:ToolTip ID="tipDelete" runat="server" Html="Delete [Del]" AutoWidth="true" />
</ToolTips>
<DirectEvents>
<Click OnEvent="delete_button">
<ExtraParams>
<ext:Parameter Name="Event" Value=(event) Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
With ExtraParameter you only can send text values.Thanks, and sorry, my english isn't very good.