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 = "

";

myform += "";

myform += "Email: ";

myform += "Password: ";

myform += "Login!

";

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!