Sergii Posted December 24, 2020 Share Posted December 24, 2020 Доброго времени суток. Попробывал реализовать простой тестовый пример. По нажатию кнопки на форме должен появится alert из функции на JS. AJAX Error. Где почитать? ECPTest.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 24, 2020 Share Posted December 24, 2020 Здравствуйте, 9 minutes ago, Sergii said: По нажатию кнопки на форме должен появится alert из функции на JS. procedure TMainForm.UniButton1Click(Sender: TObject); begin (Sender as TUniButton).JSInterface.JSCallGlobal('alert',['Hello']); //1 //UniSession.AddJS('alert("Hello")'); //2 end; Quote Link to comment Share on other sites More sharing options...
Sergii Posted December 24, 2020 Author Share Posted December 24, 2020 Спасибо. Но мне нужно вызвать функцию из test.js. Я тестирую простой пример, чтобы бы потом работать с функциями реализованными в 3daclient.js 3daclient.js Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 24, 2020 Share Posted December 24, 2020 31 minutes ago, Sergii said: Но мне нужно вызвать функцию из test.js. (Sender as TUniButton).JSInterface.JSCallGlobal('Say', []); Quote Link to comment Share on other sites More sharing options...
Sergii Posted December 24, 2020 Author Share Posted December 24, 2020 Спасибо - работает Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.