



That isn't so much changing the script from Javascript 1 as it is using Javascript to do something more easily done with PHP. But yes, it is possible if you create objects.

<script language="javascript">
c="";
d="";
c=ut(c);
d=tt(d);
a=c;
b=d;
//document.write(a+'\n'+b);
//function validatey(y)
//{
//if(y == b)
//{
//alert("Authentication Successful. Redirecting...");
//window.location = "/morelater.html";
//}
//else
//{
//alert("Authenication failure...");
//}
//}
function validatex(x,y)
{
if(x == unescape(a))
{
alert("User name isValid. Now checking password...");
if(y == unescape(b))
{
alert("Authentication Successful. Redirecting...");
window.location = "/morelater.html";
}
else
{
alert("Authentication failure...");
}
}
else
{
alert("Authentication Failure...");
}
}
</script>
<table border="1">
<tr>
<td>
<h4>BurthedWurm Security XML Authentication</h4><br>
User:<input type="text" id="usr" value=""><br>
Pwrd:<input type="password" id="pwd" value="">
<br><br>
<button onsubmit="validatex(document.getElementById('usr').value,document.getElementById('pwd').value);">Submit</button>
</td>
</tr>
</table>


Users browsing this forum: No registered users and 0 guests