Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expected ; error

Status
Not open for further replies.

swilliams

Programmer
Aug 23, 2000
583
BM
Hi,
I am trying to check a form field on click of a button calling a function but I am getting the error 'Expected ;'.
Can you tell me what is wrong with my function (below)??

function Check_Form(){
If(document.frmNewArticle.txtMain.value==""){
alert("Main details of article are needed.");
}
}

TIA [sig]<p>Simon<br>[/sig]
 
did you try putting the if in lower case? [sig]<p>nick bulka<br><a href=mailto: > </a><br>[/sig]
 
Thanks Nick,

That worked. [sig]<p>Simon<br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top