Hey.... The validation system that kaeli made works smooth.... Now I was
wondering if it would be correct to make some variations to it like this:
-----original kaeli's code-------
<html>
<head>
<title> test </title>
<script type="text/javascript">
function checkLogin()
{
var a=prompt("enter the password");
if (a=="noway") writeSuccess();
else writeFail();
}
function writeSuccess()
{
document.getEle mentById("write Area").innerHTM L="Success!";
}
function writeFail()
{
document.getEle mentById("write Area").innerHTM L="Fail!";
}
</script>
</head>
<body onLoad="checkLo gin()">
<div id="writeArea"> </div>
</body>
</html>
-------my variations--------
<html>
<head>
<title> test </title>
<script type="text/javascript">
function checkLogin()
{
myhtml = "thewholelo t of my web page from after <body> and until before
</body>
var a=prompt("enter the password");
if (a=="noway") writeSuccess();
else writeFail();
}
function writeSuccess()
{
document.getEle mentById("write Area").innerHTM L= myhtml;
}
function writeFail()
{
document.getEle mentById("write Area").innerHTM L="Wrong password!!! Reload
the page";
}
</script>
</head>
<body onLoad="checkLo gin()">
<div id="writeArea"> </div>
</body>
</html>
So, you think it's correct? Should I have any kind of consideration since I
am trying to create a character-like variable that is 16kb wide??
Cheers!!!
Yodai
wondering if it would be correct to make some variations to it like this:
-----original kaeli's code-------
<html>
<head>
<title> test </title>
<script type="text/javascript">
function checkLogin()
{
var a=prompt("enter the password");
if (a=="noway") writeSuccess();
else writeFail();
}
function writeSuccess()
{
document.getEle mentById("write Area").innerHTM L="Success!";
}
function writeFail()
{
document.getEle mentById("write Area").innerHTM L="Fail!";
}
</script>
</head>
<body onLoad="checkLo gin()">
<div id="writeArea"> </div>
</body>
</html>
-------my variations--------
<html>
<head>
<title> test </title>
<script type="text/javascript">
function checkLogin()
{
myhtml = "thewholelo t of my web page from after <body> and until before
</body>
var a=prompt("enter the password");
if (a=="noway") writeSuccess();
else writeFail();
}
function writeSuccess()
{
document.getEle mentById("write Area").innerHTM L= myhtml;
}
function writeFail()
{
document.getEle mentById("write Area").innerHTM L="Wrong password!!! Reload
the page";
}
</script>
</head>
<body onLoad="checkLo gin()">
<div id="writeArea"> </div>
</body>
</html>
So, you think it's correct? Should I have any kind of consideration since I
am trying to create a character-like variable that is 16kb wide??
Cheers!!!
Yodai
Comment