JS Help - SImple (i think)

Whenever I try to add:Function CheckFields() to the JS Header on a form, I keep getting…

Missing ; before statement… (WTF !)

Yet all examples I see don’t have a ;

This is just ticking me off big time.

I’m putting this in the form’s JSHeader

Function CheckFields()

{

var message = “”;

if (Field1 == “”)

{message = message + “Name Field. \n” ;}

if (Field2 == “”)

{message = message + “Title Field. \n” ;}

if (Field3 == “”)

{ message = message + “Dept Field. \n” ;}

if (Field4 == “”)

{ message = message + “Hobby Field. \n” ;}

if( message.Length > 0 )

{

alert( message + “\n Please fill in the required areas listed\nabove before submitting document\n\nThank you” );

}

}

And this on the submit button…

CheckFields()

Can anyone help me with this please?

Subject: JS is case sensitive

Change “Function” to “function”

Subject: im a noob at JS

Thanks… that worked…

~Brett

Subject: Don’t beat yourself up…

I find that working with LotusScript all the time makes me easily fall into the same traps when working with less forgiving languages. I’m sure I’ve made exactly the same mistake.