easegura777 Posted October 22, 2020 Share Posted October 22, 2020 I have the following code and it works correctly in UnimHTMLFrame, now I would like to execute the function from the click event of a button to pass it a parameter <input type="button" value="Say hello" onClick="showAndroidToast('Hello Android!')" /> <script type="text/javascript"> function showAndroidToast(toast) { Android.showToast(toast); } </script> Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2020 Share Posted October 22, 2020 6 minutes ago, easegura777 said: now I would like to execute the function from the click event of a button Hello, Which button? Please explain more. Link to comment Share on other sites More sharing options...
easegura777 Posted October 22, 2020 Author Share Posted October 22, 2020 Just now, Sherzod said: Hello, Which button? Please explain more. pressing o pushing UnimButton execute Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2020 Share Posted October 22, 2020 6 minutes ago, easegura777 said: UnimButton Try this, for example: procedure TMainmForm.UnimButton1Click(Sender: TObject); begin (Sender as TUnimButton).JSInterface.JSCall('showAndroidToast', ['Hello']) end; Link to comment Share on other sites More sharing options...
easegura777 Posted October 22, 2020 Author Share Posted October 22, 2020 13 minutes ago, Sherzod said: Try this, for example: procedure TMainmForm.UnimButton1Click(Sender: TObject); begin (Sender as TUnimButton).JSInterface.JSCall('showAndroidToast', ['Hello']) end; Not found!! Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2020 Share Posted October 22, 2020 Please make a simple testcase if possible. Link to comment Share on other sites More sharing options...
Recommended Posts