wxWebControl::Execute() invokes a JavaScript function in the web content that's loaded in the web control. So, make sure this function is properly defined in the content you're loading, and then you should be able to call it with Execute().

For example, suppose you define a JavaScript function in your webpage as follows: