In addition to Ramsey's comments if you are saying that you are
using a jsp file extension for your page and running CFMX then JRun is answering
the call and it does not understand the cfform tag.
Bryan LaPlante
----- Original Message -----
Sent: Wednesday, February 19, 2003 12:35
PM
Subject: RE: [KCFusion] ColdFusion and
JSP pages
Hi Chris,
I think the problem is that cfform is an all
or nothing deal. You can use your own form validation, or you can use
cfform/cfinput, but not a combination of the two. The reason is that
cfform generates a _javascript_ function that uses the onsubmit event. So
if you specify an onsubmit event, I believe CF will ignore it, or not run it's
own validation. I don't think onsubmit is a valid attribute of
cfform. (I could be wrong on this).
Thanks, Ramsey
At
12:36 PM 2/19/2003, you wrote:
I have a form where I am using cfform. I would like to also
include my own _javascript_ to use for validation, but it is not
working. What am I doing wrong? <script
language="_javascript_"> <!-- function subform(o) { if
(o.email.value=='') { alert('email is required!'); o.email.focus();
return false; } else { if (isemail(o.email.value)==false) {
alert('Invalid email address!'); o.email.focus();
o.email.value=o.email.value; return false; } } return
true } function
isemail(v) { var i=false; if (v!="") { var
re=/^([A-Za-z0-9_-]){1,}(\.([A-Za-z0-9_-]){1,})*@(([A-Za-z0-9_-]){1,}\.)+([A-Za-z0-9]){1,}$/; if
(re.test(v)==true) { i=true; } } return
i; } //--> </script> </head> <body> <cfform action="" method="post"
onsubmit="return subform(this);"> <input type=text size="40"
name="email"><p> <input type="submit"
value="Submit"> </cfform>
Christopher V. Holdman [EMAIL PROTECTED]
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc. List
Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions,
Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To
Subscribe.................... mailto:[EMAIL PROTECTED] To
Unsubscribe................ mailto:[EMAIL PROTECTED]
|