Before you ask why im using IE5, Its because im making a application for a device that runs on Windows CE, and the Internet Explorer function thats running on the device is IE5.....
Now on to my question, I've made a piece of code for "handling" data. And with handling i mean using specific functions to make a end string that i submit. I have 1 textbox called bonregels and the data from that textbox should go into the textarea after a short period of time. I tought i had it working but all of the sudden it did not work anymore, the data from the textfield did not go into the textarea. Can someone help me figure out whats goeing wrong?
This is my fiddle with the code that ive made: https://jsfiddle.net/bm6Lprdd/
Heres the javascript function that handels the data transfer from the textbox to the textarea.
function AddToList () {
var bonregel = document.getElementById("bonregel");
var val = bonregel.value.toString();
if (val != "") {
var box = document.getElementById("bonregelbox");
if (box.value != "")
box.value = val + "\n" + box.value;
else
box.value = val + box.value;
}
bonregel.value = "";
bonregel.focus();
}
var delayred = [];
function delay(callback, id, calldelay) {
clearTimeout(delayrec[id]);
delayrec[id] = setTimeout(callback, calldelay);
}
function keyup(event) {
var locatiebox = document.getElementById("locatie");
var bonregelbox = document.getElementById("bonregelbox");
var bonregels = bonregelbox.value.split(/\r\n/).join(",");
var locatie = locatiebox.value;
if (event.keyCode == 125)
SubmitContent(locatie, bonregels);
else
delay(AddToList, "AddToList", 500);
}
I think this piece of code is the problem but im not sure, the other code can be found in the fiddle.