[thelist] ColdFusion required="yes"attribute doesn'twork in<CFINPUT>
Chris Hayes
chris at lwcdial.net
Wed Jul 12 12:20:59 CDT 2006
I don't know, but things have certainly changed... here's my view-source.
You should take a look an form a google search bease on the differences.
Is a CF upgrade an option?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>
<script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>
<script type="text/javascript">
<!--
function _CF_checkTestForm(_CF_this)
{
//reset on submit
_CF_error_exists = false;
_CF_error_messages = new Array();
_CF_error_fields = new Object();
_CF_FirstErrorField = null;
//form element Test required check
if( !_CF_hasValue(_CF_this['Test'], "TEXT", false ) )
{
_CF_onError(_CF_this, "Test", _CF_this['Test'].value, "Please");
_CF_error_exists = true;
}
//display error messages and return success
if( _CF_error_exists )
{
if( _CF_error_messages.length > 0 )
{
// show alert() message
_CF_onErrorAlert(_CF_error_messages);
// set focus to first form error, if the field supports js
focus().
if( _CF_this[_CF_FirstErrorField].type == "text" )
{ _CF_this[_CF_FirstErrorField].focus(); }
}
return false;
}else {
return true;
}
}
//-->
</script>
</head>
<body>
<form name="TestForm" action="/test.cfm" method="post" onsubmit="return
_CF_checkTestForm(this)">
<input name="Test" id="Test" type="text" />
<input type="Submit">
</form>
</body>
</html>
More information about the thelist
mailing list