1
I use the TWebbrowser
in an application Delphi XE7
, but I’m having trouble trying to execute commands javascript
.
(Oleexception ... Unable to complete operation Error: 80020101 )
This happens with any function that I try to execute, be it my or jquery for example, it seems that the function is not even executed. The procedure I use to perform is as follows: How to call Javascript functions in a Twebbrowser from Delphi in my case, I have the function:
function colaNota () {
$('#corpo').append($('<div id="' + new_nota_id + '">' + new_nota_bar + '<p>' + new_nota_texto + '</p><div/>').addClass('notas ui-widget-content').css({
left: new_nota_x,
top: new_nota_y }));
controlaBarraMensagens('oculto');
$( ".notas" ).draggable();
$("#corpo").removeClass("inserindo");
$("#sub_indice_mold").removeClass("visivel");
clearNota();
};
In Delhi I’m calling it that:
JSFn := 'colaNota();'; //Assim não funciona
JSFn := 'alert("Assim funciona");';
HTMLWindow.execScript(JSFn, 'JavaScript');
edits the question and posts one of the functions
– Junior Moreira