M
Mike
I've been trying for the past week to put a simple code together. I
have done a LOT of searching, found scripts showing the functions I
would like to use, however when I mix them it all goes wrong, somehow
I always end up with error messages and functions not working right.
Can someone please help me?
I have a form, inside is 1 Text Field and 2 Password Fields. What I'm
looking to do is:
- Make sure password fields are equal
- Set Minimum/Maximum amount of characters in each field
- Disable submit button after clicking submit
I plan to add more text fields in the future. Will I be able to? I
know how to add it in the form, but how do I change the script?
Any help is appreciated. What I have so far may not be worth a look,
it's not even working, I don't know why, but here is goes:
<html>
<head>
<title>Test Page 01</title>
<script language="JavaScript">
<!--
function checkPw(element) {
pw1 = document.FormName.pw1.value;
pw2 = element.value;
if (pw1 != pw2) {
alert ("Passwords do not match. Please re-enter.");
document.FormName.pw1.value="";
document.FormName.pw2.value="";
document.FormName.pw1.focus();
return false;
}
}
// -->
</script>
</head>
<body>
<form action="http://www.photoshelf.net/cgi-bin/mailto"
onsubmit="return FrontPage_Form1_Validator(this)" method="post"
name="FormName">
<input type="hidden" name="THANKURL"
value="http://www.somepage.org/ok.htm">
<input type="hidden" name="RECIPIENT" value="(e-mail address removed)">
<input type="text" name="UserName" size="20" maxlength="60">
<input type="password" name="pw1" size="20" maxlength="60">
<input type="password" name="pw2" size="20" maxlength="60"
onBlur="checkPw(this)"><br>
<input type="submit" value="Submit Application" onClick="if(this.value
== 'Continue') this.form.submit();">
</form>
</body>
</html>
Thanks. Mike
have done a LOT of searching, found scripts showing the functions I
would like to use, however when I mix them it all goes wrong, somehow
I always end up with error messages and functions not working right.
Can someone please help me?
I have a form, inside is 1 Text Field and 2 Password Fields. What I'm
looking to do is:
- Make sure password fields are equal
- Set Minimum/Maximum amount of characters in each field
- Disable submit button after clicking submit
I plan to add more text fields in the future. Will I be able to? I
know how to add it in the form, but how do I change the script?
Any help is appreciated. What I have so far may not be worth a look,
it's not even working, I don't know why, but here is goes:
<html>
<head>
<title>Test Page 01</title>
<script language="JavaScript">
<!--
function checkPw(element) {
pw1 = document.FormName.pw1.value;
pw2 = element.value;
if (pw1 != pw2) {
alert ("Passwords do not match. Please re-enter.");
document.FormName.pw1.value="";
document.FormName.pw2.value="";
document.FormName.pw1.focus();
return false;
}
}
// -->
</script>
</head>
<body>
<form action="http://www.photoshelf.net/cgi-bin/mailto"
onsubmit="return FrontPage_Form1_Validator(this)" method="post"
name="FormName">
<input type="hidden" name="THANKURL"
value="http://www.somepage.org/ok.htm">
<input type="hidden" name="RECIPIENT" value="(e-mail address removed)">
<input type="text" name="UserName" size="20" maxlength="60">
<input type="password" name="pw1" size="20" maxlength="60">
<input type="password" name="pw2" size="20" maxlength="60"
onBlur="checkPw(this)"><br>
<input type="submit" value="Submit Application" onClick="if(this.value
== 'Continue') this.form.submit();">
</form>
</body>
</html>
Thanks. Mike