sahin_1982
Newbie
Posts: 1
Registered: 9/1/2006
Location: DGP
Member Is Offline
|
| posted on 9/1/2006 at 12:39 AM |
|
|
validator not working? Plz Help!!
1. I could not find why the validator is not working in "cntct.php"?
2. In "chngPss.php" the validator is working properly.
3. I tried, pasting the same code from from "chngPss.php" to "cntct.php"
4. But the same code is not working in "cntct.php"
5. sir,plz help me and give me some solution.
6. odbc_result(...) is working properly.
::::the code in "cntct.php"::::
<html>
<head>
<script language="JavaScript" src="JS/Validator/validator.js"></script>
</head>
<body >
<form name="frmCntct" action="postCntct.php" method="post" onSubmit="return v.exec()">
<table class="worktable" >
<!-------------- info Heading ------------>
<tr>
<td colspan="2" class="infoFont"> Change User Password</td></tr>
<tr><td colspan="2"> </td></tr>
<!-------------- end info Heading ------------>
<tr>
<td id="t_cmbUser" width="30%" align="right" class="lblFontAdmin"><font class="mandFont">*</font>
User Name
</td>
<td>
<select name="cmbUser" id="cmbUser">
<?
while(odbc_fetch_row($process))
{ ?>
<option id="<?=odbc_result($process,'userPass');?>" class="txtFontAdmin" value="<?=odbc_result($process,'userId');?>"
onChange=" "><?=odbc_result($process,'userName');?></option>
<input type="hidden" name="hpass" value="<?=odbc_result($process,'userPass');?>">
<? } ?>
</select>
</td>
</tr>
<tr>
<td id="t_currPass" width="30%" align="right" class="lblFontAdmin">
<font class="mandFont">*</font>Current Password
</td>
<td>
<input name="currPass" type="password" class="pssFontAdmin">
</td>
</tr>
<tr>
<td id="t_newPass" width="30%" align="right" class="lblFontAdmin">
<font class="mandFont">*</font>New Password
</td>
<td>
<input name="newPass" type="password" class="pssFontAdmin">
</td>
</tr>
<tr>
<td id="t_rePass" width="30%" align="right" class="lblFontAdmin">
<font class="mandFont">*</font>Retype Password
</td>
<td>
<input name="rePass" type="password" class="pssFontAdmin">
</td>
</tr>
<tr>
<td align="right" > <input name="submit" type="submit" class="btnFont" value="Save" ></td>
</tr>
</table>
</form>
</body>
</html>
<script language="JavaScript">
// form fields description structure
var a_fields = {
'cmbUser' : {
'l': 'User Name', // label
'r': false, // required
//'f': 'alpha', // format (see below)
't': 't_cmbUser',// id of the element to highlight if input not validated
'm': null, // must match specified form field
'mn': 0, // minimum length
'mx': null // maximum length
},
'currPass' : {'l':'Current Password','r':true,'f':'alphanum','t':'t_currPass'},
'newPass' : {'l':'New Password','r':true,'f':'alphanum','t':'t_newPass','m':'rePass'},
'rePass' : {'l':'Retype Password','r':true,'f':'alphanum','t':'t_rePass'}
},
o_config = {
'to_disable' : ['Submit'],
'alert' : 1
}
// validator constructor call
var v = new validator('frmCntct', a_fields, o_config);
</script>
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/1/2006 at 09:16 AM |
|
|
any error messages? make sure to enable those
|
|
|
|