View Single Post
  #3 (permalink)  
Old May 10th, 2008, 14:59
spinal007's Avatar
spinal007 spinal007 is offline
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,617
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Validate a form only if certain conditions are met

I haven't read through the entire code, I haven't seen the HTML, so I'm gonna go on under the assumption that you have those under control. The problem is quite simple as far as I can see.

function abc(){ }; defines a function.
abc(); executes the function.

What you're essentially saying in your code is:
Quote:
if radio1 is checked then
remember this function for me and wait until I ask you to run it
But you never call the function.

Just remove "function validate_form ()" and the corresponding braces and the browser will execute your validation code.
Reply With Quote