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]

Reply via email to