|
Yuck. I’ve inherited code which I’m
debugging and it all uses cfform, a personal peeve of mine. Now, perhaps its because I came back from Glastonbury
yesterday and so am a little bit mental, but I’m trying to get this
cfform to fire off a validation script on submit. So I’ve added the onsubmit parameter to the
cfform call like thus: <cfform
action=""
method="POST" name="itemFrm"
enctype="multipart/form-data"
chkRevision();"> And I have the following function declared just above
it like thus: <script> function chkRevision() { if
(document.itemFrm.revision.value &&
!document.itemFrm.EditComments.value.length) { alert('Warning!\n\nPlease
ensure that you have completed the \'Edit Comments\' field.'); return false } else { return true } } </script> That should work yea? So why does the JS give me a
Object Not Found error when run at the browser on this line (which is obviously
created by cfform) function _CF_checkitemFrm(_CF_this) { if (!_CF_hasValue(_CF_this.title,
"TEXT" )) { if (!_CF_onError(_CF_this,
_CF_this.title, _CF_this.title.value, "Please enter Title")) { return false; } } return chkRevision(); return true; } p.s. I *would*
dearly love to turn the whole form into a normal form, but there’s a lot
of work required (large form) to do that and this is a quick fix, very
unfortunately. I think I’ve left my mind in a field. Ta everyone. Rich |
- RE: [ cf-dev ] CFFORM duncan . cumming
- RE: [ cf-dev ] CFFORM Damien Gallagher
- RE: [ cf-dev ] CFFORM Stephen Pope
- RE: [ cf-dev ] CFFORM duncan . cumming
- RE: [ cf-dev ] CFFORM Damien Gallagher
- Re: [ cf-dev ] cfform Rich Wild
- Re: [ cf-dev ] cfform duncan . cumming
- RE: [ cf-dev ] cfform Mark Smyth
