Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
urghosthost authored Jan 19, 2024
1 parent 13bb44d commit 3bcedfd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
2 changes: 2 additions & 0 deletions js/jquery-3.7.1.min.js

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions js/mainjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,32 @@ function formFunction() {
}
// Set/Create Cookies
function setCookie(cookieName, cookieValue, expireDays) {
let date = new Date();
date.setTime(date.getTime() + (expireDays*24*60*60*1000));
const expirationDate = "expires="+date.toUTCString();
document.cookie = cookieName +"=" + cookieValue +";" + expirationDate + "; domain=axcelmarkapplications.site; secure;";
const d = new Date();
d.setTime(d.getTime() + (expireDays*24*60*60*1000));
let expires = "expires=" + d.toUTCString();
document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/";
}

// Get Value of Cookie
function getCookie(cookieName) {
const name = cookieName + "=";
const cookieDecoded = decodeURIComponent(document.cookie); //to be careful
const cookieArray = cookieDecoded.split('; ');
let res;
cookieArray .forEach(val => {
if (val.indexOf(name) === 0) res = val.substring(name.length);
})
return res;
let name = cookieName + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i < ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}

// Function for "Click to Apply Button"
function applyButton(option) {
setCookie('username',option,30);
setCookie("option",option,30);
window.location = 'application.html';
}

0 comments on commit 3bcedfd

Please sign in to comment.