Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
loeasy68
GitHub Repository: loeasy68/loeasy68.github.io
Path: blob/main/website/Drawing-app/userauth.js
2940 views
1
//Prompt For Name
2
let username;
3
let usernameexist = false;
4
let usernamearray;
5
6
function userprompt(){
7
username = prompt("Enter Your Full Name : ");
8
}
9
userprompt();
10
11
//Authentication Setup
12
if(username == null || username == ""){
13
window.location.href = "nullusername.html";
14
}else{
15
usernamearray = username.split("");
16
for(var s = 0; s < usernamearray.length; s++){
17
if(usernamearray[s] != " "){
18
usernameexist = true;
19
}
20
}
21
}
22
if(usernameexist == false){
23
window.location.href = "nullusername.html";
24
}
25