Jul 12, 2011, 5:30 PM
[CLOSED] Call directMethods from button html.
Hi,
Is possible call directMethods from tag html the panel?
Html Panel
Error : Uncaught TypeError: Object #<Object> has no method 'PesquisarDocumento'
My codebehind:
Thanks.
Is possible call directMethods from tag html the panel?
Html Panel
<ext:Panel
ID="Panel1"
runat="server"
Header="false"
Region="North"
Border="false"
Html="<div id='header'><button TYPE=BUTTON class='btnSend imageReplacement' onClick='busca()'></button></div>">
For exemple:var busca = function () {
var txtBusca = document.getElementById("txtBusca");
if (txtBusca.value == '')
Ext.Msg.show({
title: 'Atenção',
msg: 'Favor digitar um termo para a busca!',
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
else {
Ext.net.DirectMethods.PesquisarDocumento();
}
}
This " Ext.Msg.show" work well, but this "Ext.net.DirectMethods.PesquisarDocumento();" not work.Error : Uncaught TypeError: Object #<Object> has no method 'PesquisarDocumento'
My codebehind:
[DirectMethod]
public void PesquisarDocumento()
{
//test
this.ResourceManager1.AddScript("function () { Ext.Msg.notify('Sucesso', 'Você será redirecionado para a página do arquivo físico!'); }");
}
Any suggestion?Thanks.
Last edited by Daniil; Jul 12, 2011 at 9:33 PM.
Reason: [CLOSED]