markocrni
Newbie
Posts: 1
Registered: 7/21/2008
Location: srbija
Member Is Offline
|
| posted on 7/21/2008 at 04:39 PM |
|
|
problem in IE if style display:none
<html>
<head>
</head>
<body>
<script language="JavaScript" src="js/validator.js"></script>
<style>
.tfvHighlight {color: red;}
.tfvNormal {color: #555;}
</style>
<form name="forma" method="post" action="?gone" onsubmit="return v.exec()">
<div style="display:none">
<label id="a">a</label>
<input type="text" value="" name="a" />
</div>
<div>
<label id="b">b</label>
<input type="text" value="" name="b" />
</div>
<input type="Submit" name="Submit">
</form>
<script>
var a_fields =
{
'a': {'l': 'aaaaa','r': true, 'f':'alpha', 't':'a', 'mn': 2, 'mx': 10},
'b': {'l': 'bbbbb', 'r': true,'f':'alpha','t':'b','mn': 2, 'mx': 10}
},
o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}
var v = new validator('forma', a_fields, o_config);
</script>
</body>
</html>
This is not working in IE! Input's parent element has style="display:none". Validator has problem in validator.js on lines 209 and 210.
If we change style.display to any other value, validator will work. Quick fix is to remove this two lines from validator.js, and everything will work
(except error positioning)
|
|
|
|