Hi guys,
i got 2 big problems.
The first one is that i wanna search in an array for smth. It works if i use indexOf, but i gotta write the input exactly the same way as it's written in the array. So if the first letter is big in the array and i write a low letter in the input it won't find it. So my question is: how can i make smth like a "like" statement in SQL for javascript?
The 2nd problem is the followin: I wanna get a new div for every one of those outputs, but i don't get. I use a for (var bla bla bla)
var kol = document.getElementById("kol");
var newdiv = document.createElement('div');
newdiv.id = 'hallo';
newdiv.innerHTML = '<div id="klasse1">Search: ' + search\_output[i]["name"];
kol.appendChild(newdiv);
And i defined a css id with "klasse1" and told it that there should be top 5px, but all those divs just still hang together.
Thanks in advance
Michael