PDA

View Full Version : Making a callback with coolite from javascript



petherson
Sep 22, 2008, 10:48 AM
Hello, I?ve got a problem, when I was trying to do a post with Coolite. Ive created ContextMenu with Ext (without Coolite) this ContextMenu has a delete option . When the user click it, I want to post the id to a page that will do the operation. I want to do using server-side Coolite controls(with ajax), and not with pure javascript. Is there a way?
Thank you.
Here is some pieces of my source code.


<script language="javascript" type="text/javascript" src="../../extjs/adapter/ext/ext-base.js"></script>
<script language="javascript" type="text/javascript" src="../../extjs/ext-all.js"></script>
<script language="javascript" type="text/javascript">
var menuRowContext = new Ext.menu.Menu({
id: 'menuTeste',
items: [
{
text: 'Delete',
iconCls:'excluir',
handler: function()
{
}
}
]
});
function linhaGrid(t,rowIndex,e)
{
var xy = e.getXY();
menuRowContext.showAt(xy);
}
</script>




<ext:GridPanel ID="GridPanel1" runat="server" StoreID="store1"
Width="1000" Height="300" Frame="true" Title="Teste"
ButtonAlign="Left">
<Listeners>
<RowContextMenu Fn="linhaGrid" />
</Listeners>
</ext:GridPanel>