Two functions

They have: 1 posts

Joined: Jun 2006

Hi there,

I wonder if any of you fine people can help me sort out a thing that has me beat at the moment.

On this page http://www.fdin.co.uk/seminars/taste.html I have a webform (at the bottom) that needs to do two things, the check all forms are filled check and now one that changes the name to initial capitals.

I've found script that can do intitial caps, but I need to run the script that is already in place, so is there a way to capitalise the name too?

TIA

Mr MELT

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

change the onclick to be onSubmit="return multiCheck(this)"'

and then add something like this to the section, assuming the fuction call to initcaps is initCaps("realname")

function multiCheck(tForm)
{
  if (checkEmail(tForm))
  {
    initCaps("realname");
    retrun true;
  }
  else
  {
    return false;
  }
}
'
Basically, stack the calls to teh functions within another function. However, after looking at the code to your page, just add the call to the InitCaps function from within the email check one.

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.