If you do:
<input type="button" name="B12" value="Submit"
onClick="validateForm(this.form)">
then just do this in the function:
function validateForm(form){
jsstuff here;
form.submit();
}
----- Original Message -----
From: "Colm Brazel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 3:59 PM
Subject: RE: [ cf-dev ] Javascript with cfinclude?
> <input type="button" name="B12" value="Submit" onClick="validateForm()">
>
> >>Change the input to Type Button and put the submit in the function and
> get rid of "return" in the onClick
>
> OK, but what do youmean by putting submit in the function? Still get,
"done
> but with errors on the page", no javascript response, have checked case of
> variables as well, still missing something...
>
> rgds
>
> colm
>
>
> -----Original Message-----
> From: Matt Horn [mailto:matt.horn@;mediatelgroup.co.uk]
> Sent: 24 October 2002 15:25
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] Javascript with cfinclude?
>
>
> Change the input to Type Button and put the submit in the function
>
> and get rid of "return" in the onClick
>
> At 15:15 24/10/2002 +0100, you wrote:
> >It shouldn't be the includes messing things up. All the JS stuff happens
on
> >the client machine so if it's sound it should work.
> >
> >Ade
> >
> >-----Original Message-----
> >From: Colm Brazel [mailto:c.brazel@;ntlworld.ie]
> >Sent: 24 October 2002 15:14
> >To: [EMAIL PROTECTED]
> >Subject: [ cf-dev ] Javascript with cfinclude?
> >
> >
> >related problem, I have the following generic javascript in the header of
a
> >file,
> ><script language="Javascript">
> ><!--
> > //This checks if the user enters a name in the name field.
> > //It checks if the field is empty, and if it is, an alert box
pops
> >up.
> > function validateForm()
> > {
> > var theform=true
> > if (document.form1.TITLE1.value=="")
> > {
> > name=false
> > alert("You need to give your name?")
> > document.form1.TITLE1.focus()
> > }
> >
> > }
> > //Now for the email detection.
> > var at = document.form1.email2.value.indexOf("@",0)
> > if (at < 1 && name)
> > {
> > name = false
> > alert ("Put an @ symbol in!")
> > document.form1.email2.focus()
> > }
> > //-->
> > </script>
> >
> >But the form itself is in another file included with cfinclude with the
> code
> >to the javascript,
> ><input type="submit" value="Submit" name="B12" onclick="return
> >validateForm()">
> > <input type="reset" value="Reset" name="B22">
> >
> >On the same page as the included file is some CF errror checking which
> >works, but the javascript does not, is the problem to do with the fact
the
> >form is included on the page, I`ll check later by putting the form
directly
> >on the page that uses it. Anyone pointers on why this code should crash,
> >I`ll check if javascript is turned on in the browser as well:-)
> >
> >cheers
> >
> >
> >
> >Colm
> >
> >Colm Brazel MA
> >CB Publications
> >
> >www.cbweb.net <http://www.cbweb.net>
> >[EMAIL PROTECTED] <mailto:design@;cbweb.net>
> >[EMAIL PROTECTED] <mailto:cbweb@;iol.ie>
> >
> >
> >
> >
> >
> >
> >-----Original Message-----
> >From: Robertson-Ravo, Neil (REC)
> >[mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> >Sent: 24 October 2002 13:32
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: [ cf-dev ] OT: Javascript validating checkboxes
> >
> >
> >ah, found the 'bug'; I was asking it to check for the button
> >name..........muppet
> >
> >-----Original Message-----
> >From: Rich Wild [mailto:r.wild@;e-mango.com]
> >Sent: 24 October 2002 13:10
> >To: '[EMAIL PROTECTED]'
> >Subject: [ cf-dev ] OT: Javascript validating checkboxes
> >
> >
> >Neil, post your code...
> >
> >
> >--
> >** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >For human help, e-mail: [EMAIL PROTECTED]
> >
> >--
> >** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >For human help, e-mail: [EMAIL PROTECTED]
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
> >
> >
> >--
> >** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >For human help, e-mail: [EMAIL PROTECTED]
> >
> >--
> >** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >For human help, e-mail: [EMAIL PROTECTED]
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.394 / Virus Database: 224 - Release Date: 10/3/2002
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]