Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
client device ID
#9
The problem is solved. If someone is interested in the solution method, then I give it below.

Previously, in the body of the program, after the successful registration of the client, we provide to write the corresponding information to the components with the names lbUserLogin and lbUserPassw.

In the program after successful client registration in ScriptEvents writing:
// Saving data in localStorage
var UserLogin = document.getElementById("LBUSERLOGIN").textContent;
var UserPassw = document.getElementById("LBUSERPASSW").textContent;
localStorage.setItem('UserLogin',UserLogin);
localStorage.setItem('UserPassw',UserPassw);

//Before requesting registration data (Login-Password) from the client, we will check whether these data are available in LovalStorage
in ScriptEvents writing:

var UserLogin = localStorage.getItem('UserLogin');
var UserPassw = localStorage.getItem('UserPassw');
document.getElementById("EDAUTOLOGIN").value = UserLogin;
document.getElementById("EDAUTOPASSW").value = UserPassw;

Next, in the body of the program, we analyze the information in the edAutologin and edAutopassw components and use it to register a client in the system without asking a question to enter registration data.

To reset information in localStorage :
On the "Exit" button in ScriptEvents writing:
// Clear Data in LocalStorage
localStorage.setItem('UserLogin','');
localStorage.setItem('UserPassw','');

Good luck in mastering JavaScript
Reply


Messages In This Thread
RE: client device ID - by Alexandre Machado - 04-26-2023, 08:49 PM
RE: client device ID - by DanBarclay - 04-30-2023, 03:40 AM
RE: client device ID - by Alexandre Machado - 05-01-2023, 08:46 PM
RE: client device ID - by Сергей Александрович - 06-23-2023, 04:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)