0

This is really frustrating. I've downloaded TChromium from the following link: http://dcef3.googlecode.com/svn

managed to install it and I have also managed to pass some data from delphi XE2 to my web page using some JavaScript.

I am new to TChromium and the documentation out there is not helping me very much. I need to run some Delphi code after the user click on a web button. When the user clicks on a web button element I want to run some Delphi code. Could you help with some examples? None of the examples out there seem to work. They seem the copy and paste of the same solution that it is just not working on dcef3 and Delphi XE2.

For example I have tried the following link: How to expose "native functions" to Javascript in a web page using Chromium and Delphi 6?

  • I have copied the line RegisterExtension; in the initialization part of my main form.
  • I copied the procedure RegisterExtension; after the uses section of my main form.
  • Then I have put the TMyHandler = class(TCefv8HandlerOwn) definition before the declaration of my main form and implemented the "Execute" method.
  • Put the code Frame.ExecuteJavaScript('cef.test.test_object().GetMessage();', 'about:blank', 0); in a button on my main form

When i click it nothing happens... Any clue?

I am using Delphi XE2.

Thank you for your help

Community
  • 1
  • 1
user1536396
  • 435
  • 2
  • 7
  • 20
  • So you don't like code [`like this`](http://stackoverflow.com/a/6895111/960757) ? What have you tried, what is our starting point ? What *"some of the examples"* have you tried ? How they *"didn't work"* ? – TLama Nov 27 '13 at 18:11
  • Hi Lama, thank you for your reply. I tried this code and it did not work. Let me try again and I will explained exactly what happened. Really appreciate your interest in my question. – user1536396 Nov 27 '13 at 18:16
  • Hi Lama: I have copied the line "RegisterExtension;" in the initialization part of my main form. I copied the "procedure RegisterExtension;" after the uses section of my main form. Then I have put the "TMyHandler = class(TCefv8HandlerOwn)" definition before the declaration of my main form and implemented the "Execute" method. Put the code "Frame.ExecuteJavaScript('cef.test.test_object().GetMessage();', 'about:blank', 0);" in a button on my main form and when i click it nothing happens... I am using Delphi XE2. Any clue? – user1536396 Nov 27 '13 at 18:20
  • Please [`edit your question`](http://stackoverflow.com/posts/20249825/edit) and add all these relevant information there. – TLama Nov 27 '13 at 18:37

0 Answers0