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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with For Function

Status
Not open for further replies.

SDyke

MIS
Oct 13, 2005
55
US
The following function generates an error at the 'for' ststement. The error is Expected';'

Code:
function processReqChange(){
		if(req.readyState == 4) {
			if(req.status == 200) {
				//alert("About to display");
				var newValue = req.responseText;
				
				if(newValue == "None"){
					alert("The Drawing Location List could not be constructed!. Are you sure the Job Number is correct?");
				}
				
				
				var newValuearray = newValue.split(',');
				
				for (int i=0; i<newValuearray.length; i++){
					alert(newValuearray[10]);
				}
				document.testform.dllistbox.value = newValue;
			}else {
				alert("There was a problem retrieving the XML data:\n" +
					req.statusText);
			}
		}
	}
 
Code:
for (int i=0; i<newValuearray.length; i++){

It's var i=0 instead of int i=0

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top