Question
How to i make this java script more secure? How can i improve it? // This displays the login information on the page function showlogin()
How to i make this java script more secure? How can i improve it?
// This displays the login information on the page
function showlogin() {
var myform = "
";this.document.getElementById("mylogin").innerHTML = myform;
}
//Registration script
//Verify on client side and submit if valid.
function verifyreg() {
// test for empty values
// test for required values
// test for variable length
// test for illegal or harmful characters
document.regist.submit();
}
// Login script
//Verify on client side and submit if valid.
function verifylogin() {
// test for empty values
// test for required values
// test for variable length
// test for illegal or harmful characters
document.login.submit();
}
// The following allow navigation - Do not edit!
function link(token, redir) {
//alert(token + " " + redir);
document.sessions.tokenid.value = token;
document.sessions.pagereq.value = redir;
//alert(document.sessions.tokenid.value + " " + document.sessions.pagereq.value);
document.sessions.submit();
//alert(redir);
}
function innerlink(redir) {
document.getElementById("thispage").innerHTML = displayfile(redir);
}
function rescript(redir) {
document.getElementById("thispage").innerHTML = redir;
}
//Logout
function logout() {
document.sessions.tokenid.value = "logout";
document.sessions.pagereq.value = "include/desc.html";
document.sessions.submit();
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started