This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

equivalent to "window.onload"
#8
You have to wait for the WebSocket connection to be established. Use this:
Code:
if (typeof localbus === 'object') {
  $(localbus).on('connect', function() {
    grp.write('32/1/152', true);
  });
}
Reply


Messages In This Thread
equivalent to "window.onload" - by SigmaTec - 06.06.2018, 07:32
RE: equivalent to "window.onload" - by admin - 06.06.2018, 07:51
RE: equivalent to "window.onload" - by admin - 25.06.2021, 11:48
RE: equivalent to "window.onload" - by admin - 30.06.2021, 09:31

Forum Jump: