Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iwdbgrid e funções javascript
#3
(07-09-2020, 02:19 PM)Jose Nilton Pace Wrote: Olá DeboraMezz, esse JScript que vc usou não tem um callback?, se sim, vc deve usar esse callback pra enviar para o delphi.
 Olá José, obrigada pelo retorno, segue a função:

 $(function () {
    $("td").dblclick(function () {
        var conteudoOriginal = $(this).text();
         
        $(this).addClass("celulaEmEdicao");
        $(this).html("<input type='text' value='" + conteudoOriginal + "' />");
        $(this).children().first().focus();
 
        $(this).children().first().keypress(function (e) {
            if (e.which == 13) {
                var novoConteudo = $(this).val();
                $(this).parent().text(novoConteudo);
                $(this).parent().removeClass("celulaEmEdicao");
            }
        });
         
    $(this).children().first().blur(function(){
        $(this).parent().text(conteudoOriginal);
        $(this).parent().removeClass("celulaEmEdicao");
    });
    });
});


Se eu entendi bem o callback seria o "novoConteudo"?

tentei algo assim e não funcionou

procedure novoConteudo (EventParams: TStringList);

procedure TfrmHome.IWAppFormCreate(Sender: TObject);
begin

  WebApplication.RegisterCallBack('novoConteudo', novoConteudo);

end;
Reply


Messages In This Thread
iwdbgrid e funções javascript - by DeboraMezz - 07-08-2020, 07:07 PM
RE: iwdbgrid e funções javascript - by DeboraMezz - 07-09-2020, 03:06 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)