JavaScript error expected ';'

by Andrew Browne <andrew(at)pbm.co.za>

 Date:  Mon, 29 May 2000 10:56:40 +0200
 To:  "'hwg-languages(at)hwg.org'" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
Hi all

The function below  returns a JavaScript error saying that it expects a ';' on the line which reads:
If (value == "no" || value == "") {

If anyone can tell what it is that I have done wrong, I'd greatly appreciate it.

function question209() {
 var value = ""
 for (var i=0;i<document.questions.quest315.length;i++) {
	 if (document.questions.quest315[i].checked) {
	  value = document.questions.quest315[i].value;
	  break;
	 }
	} 	
 If (value == "no" || value == "") {
  alert("This answer can only be changed if the patient''s asthma is worse than usual!");
 } 
}

Thanks
AndrewB

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.