4 comments. Current rating: (2 votes). Leave comments and/ or rate it.
Question:
In a TWebBrowser, I display a webpage with a javascript function, and i need to call Delphi code from that javascript function. How can I achieve that?
In case that you may want to develop a standalone application that contain any kind of information as HTML and javascript in a Webbrowser this components becomes very helpfull if you want the client of your application to interact with the HTML portion of the program and make some decisions in the Delphi platform according to that.
2006-09-21, 16:40:13
anonymous from Bulgaria
Answer would be more useful if it was about how to call Delphi code from javascript function when using TWebBrowser ( that is what the question was for ).
2007-10-30, 16:49:38
anonymous
You can supply your own (COM) interface (and it's implementation) and attach it to the TWebbrowser control, and make calls to that interface from javascript. Some googling will provide you good examples!