186
rated 0 times
[
193]
[
7]
/ answers: 1 / hits: 127171
/ 7 Years ago, tue, april 4, 2017, 12:00:00
I am trying to call a simple javascript function from my html page. The javascript function will decrypt using the lib.js file and the same is alerted.
Uncaught ReferenceError: decryptfun is not defined
at HTMLInputElement.onclick (test.html:18)
The below is the only file I use (along with other dependent library files).
<!DOCTYPE html>
<html>
<head>
<script type=text/javascript src=lib.js>
function decryptfun() {
var pass = hjubjbjhdgyuwj;
var encrtoken = abcdefghijklmn;
var p = lib.decrypt(encrtoken, atob(pass));
}
alert(p);
</script>
</head>
<body>
<h1>Decrypt Operation</h1>
<input type=button onclick=decryptfun() value=Click>
</body>
</html>
I tried other suggestions provided for the same type of issue at Stackoverflow but I was not successful. Can anybody help me out in locating the cause of the issue ?
More From » javascript