ballhogjoni Posted January 20, 2009 Share Posted January 20, 2009 Firefox is saying aProducts is undefined. Any ideas? var aProducts = new Array(); aProducts = xmlHttp.responseText; eDiv = document.getElementById("products"); eSelect = document.createElement("select"); for(i=0;i<=aProducts.length;i++){ option = document.createElement("option"); option.value = i; option.innerHTML = aProducts[i].name; eSelect.appendChild(option); } eDiv.appendChild(eSelect); Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 20, 2009 Share Posted January 20, 2009 where is the code that creates the xmlHttp object? Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted January 21, 2009 Author Share Posted January 21, 2009 I forgot that my db table was empty... so the xmlHttp object was getting an empty array, therefore giving me an undefined array. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.