Well for starters, your, variables don't match you have pWo and pNt in your form and pwo and pnt in your function. Variables are case sensitive. You are also using using the wrong equals sign == for the if statement.
I also changed your function call to pass the form object to the function by using this.form, to do the you need to alter your function and added a parameter to the function header, it's not necessary to be lable it "form" but that makes it easy to rember. You could call it larry or myFrom if you want to, it's just a variable name. I simply acts as a place holder for first parameter passed to it in this case "this.form"
code:
<html>
<head>
<script type="text/javascript">
function logIn(form){
var one=form.pWo.value;
var two=form.pWt.value;
if(one==two){
document.write("Thanks for log in!");
}else{
document.write("No, No, No!!");
}
}
</script>
</head>
<body>
<form name="theForm">
<p>
Enter your password:
<input type="password" name="pWo">
<p />
<p>
Enter your password again:
<input type="password" name="pWt">
<p/>
<p>
<input type="button" value="Submit" onClick="logIn(this.form)">
<input type="reset" value="Reset">
</p>
</form>
</body>
</html>
This should work, I would use longer variable names when mixing caps and lower case. Three letter passwords seems odd to me and makes it a little hard to read.
One tip, there are lots of sites out there with example and free code. I often use them as a referance when I don't know how something works. Find something similar and rip it apart to see how it works and to see if there are better ways to acomplish the task.
J. Stuart J.
[This message has been edited by jstuartj (edited 06-09-2003).]