Hello!
Im having problem generating the labels for content created by the following function:
A friend showed me this sample script to achieve generation of labels on my script, but I have been trying for hours with no luck, can someone take a look and tell me the correct usage of this script:
Thanks a lot!
Im having problem generating the labels for content created by the following function:
Code:
function setOutput(){
if(httpObject.readyState == 4){
var answer = httpObject.resultsponseText.split(",");
var results = document.getElementById("resultsultadosScan1");
var article = document.createElement("div");
var weight = document.createElement("div");
var price = document.createElement("div");
article.className = "article";
weight.className = "weight";
price.className = "price";
document.getElementById('outputText0').value = httpObject.innerHTML= answer[0];
document.getElementById('outputText1').value = httpObject.innerHTML= answer[1];
document.getElementById('outputText2').value = httpObject.innerHTML= answer[2];
article.innerHTML = httpObject.innerHTML= answer[0];
weight.innerHTML = httpObject.innerHTML= answer[1];
price.innerHTML = httpObject.innerHTML= answer[2];
results.appendChild(article);
results.appendChild(weight);
results.appendChild(price);
}
}
A friend showed me this sample script to achieve generation of labels on my script, but I have been trying for hours with no luck, can someone take a look and tell me the correct usage of this script:
Code:
function crearLabel() {
var target = document.getElementById("target");
var label = document.createElement("label");
var text = document.createTextNode("Article");
label.appendChild(text);
target.appendChild(label);
}
Thanks a lot!