easegura777 Posted October 22, 2020 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>
Sherzod Posted October 22, 2020 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.
easegura777 Posted October 22, 2020 Author Posted October 22, 2020 Just now, Sherzod said: Hello, Which button? Please explain more. pressing o pushing UnimButton execute
Sherzod Posted October 22, 2020 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;
easegura777 Posted October 22, 2020 Author 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!!
Recommended Posts