So I am using ASP.NET to program the back end, it all works fine when I push 100 elements into an array but I have 3005 elements to put into the array and it will get bigger than that.
responseTwo.Append("ts.push('" + busAddrs[final] + "'); ");
anyone know a way to have unlimated index's in an array in JavaScript?
Edit: in the front end, it comes out like this -
ts.push('ADDRESS LINE HERE'); ts.push('ANOTHER ADDRESS LINE HERE');
ect.... so 100 of the above works, any more and it stops working and the error is here:
https://gyazo.com/d7c05e8b57bb348481cd28597f61261c
&&
Uncaught SyntaxError: Unexpected token ILLEGAL
EDIT: since SOME are voting down, I looped 100 times then added ts.push('hello');
and it still returns the same error no matter whats inside it!!! - read my comments
Edit: ASP backend code:
var response = new StringBuilder();
var responseTwo = new StringBuilder();
while (cnt != tbl.Length)
{
query = busIDs[cnt];
var ttbl = db.tblbus_address.Where(c => c.BusinessID == query).FirstOrDefault();
if(ttbl != null && !string.IsNullOrEmpty(ttbl.Address1))
{
busAddrs.Add(ttbl.Address1.ToString());
} else {
busAddrs.Add("We do not have an address for this...");
}
cnt++;
}
int final = 0;
responseTwo.Append("<script> ts = []; ");
while (final != tbl.Length)
{
response.Append("<li onclick='s(" + final + ");'>" + busNames[final] + "</li>");
responseTwo.Append("ts.push('" + busAddrs[final] + "'); ");
final++;
}
responseTwo.Append(" </script>");
Output.Text = response.ToString();
jsOut.Text = responseTwo.ToString();
BusAddr is an array, BusName is an array, BusIDS is an array.
EDIT: https://gyazo.com/f95ece23b28579562a145061797b51a4 - this image shows in developer tools that there is no 'token' or anything of such, it just stops working...
EDIT: There is NO issues with having any special characters in the database, I searched for everything.