Javascript question Validation Help

HI Guys

JavaScript question here

I need this to Validate TK on all forms except RFA. The rest of the JS works already from the first Return False I am adding TK
case "Pending Approval" :
                                               TK = "Time Keeper Project Code/TKProjCode"
                                               if ( document.all.RequestType.value !== "RFA" )
                                              elseif( !RTGValidateForm(TK ) )
                        return false
                  v = "Forecast Effort (mandays)/Effort, Proposal Valid Thru/DateValidThru, Scheduled Start/DateScheduledStart, Committed Delivery/DateCommittedDelivery, Engineering Group/EngineeringGroup"
                  if ( document.all.RequestType.value == "Certification" ) v += ",Engineer Contact Name/CertEngineer,Engineer Contact Phone/CertPhone,Engineer Contact E-Mail/CertEmail"
                  if ( !RTGValidateForm( v ) )
                        return false
                  break
adspmoAsked:
Who is Participating?
 
p_parthaConnect With a Mentor Commented:
just give a space between else and if , i.e
else if (!RTGValidateForm(TK ) )


Partha
0
 
HemanthaKumarCommented:
I don't remember this JS function but I remember you asking somewhat similar q here

SO what is the problem here.. I see you have already incorporate TK value for checking ??

~Hemanth
0
 
adspmoAuthor Commented:
I am more or less just asking abiut my syntax, Is it correct or is there a different way of writing this. I think it is correct, just not sure about the ElseIF
0
 
HemanthaKumarCommented:
there is no elseif...

the if construct is like this

if {

}
else {


}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.