Welcome Guest Search | Active Topics | Sign In | Register

JavaScipt won't load first time Options
Shohin
Posted: Friday, June 17, 2022 12:30:54 AM
Rank: Newbie
Groups: Member

Joined: 6/17/2022
Posts: 1
Hello
I'm trying to build a payment terminal software using EO Total for WinForms.
For each page, I create a separate UserControl
public partial class NumberInputScreen : UserControl
{
public NumberInputScreen(MainForm parent)
{
InitializeComponent();
_parent = parent;
NumberInputScreenView.Url = _parent.viewPath + "NumberInputScreen.html";
// .... other code
}
// .... other methods

}


and call them from the MainForm

ScreenPanel.Controls.Clear();
targetScreen.Dock = DockStyle.Fill;
ScreenPanel.Controls.Add(targetScreen);

I have a problem that when the page is loaded for the first time, the JavaScript code is not executed.
eo_support
Posted: Friday, June 17, 2022 10:25:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,374
Hi,

Please try to load Url after you have added your control into ScreenPanel.Controls. If you still have problems, you can try to replace your JavaScript code with simple test code such as "console.log('test')" or "alert('test')" and check if those always run properly. If those always run properly, then you can gradually put your original JavaScript code back and see if you can find what triggered the problem.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.