Why is the individual letters being printed? and not the array words like "SAMSUNG" for example?

0
var controle;
var index = 0;
function escolheControle(c) {   
    controle = c;
    marca =todasAsmarcas[controle];
    window.location= "marcaWebkit.htm?contMenu="+contMenu+"&marca="+todasAsmarcas[controle]+"&controle="+c+"&index="+index; 
    console.log(controle+' controle-----');
    console.log(todasAsmarcas+' todasAsmarcas-----');
}

var marca; 
var todasAsmarcas = new Array(4);
todasAsmarcas[0] = new Array("Samsung", "LG", "Sony", "SempToshiba", "Panasonic", "AOC", "CCE", "Philips", "Sharp", "Toshiba", "Gradiente", "Philco", "Buster", "Semp", "Hitachi", "Sanyo", "Blue Sky", "Mitsubishi", "Aiko", "Cineral", "JVC", "Zenith");
todasAsmarcas[1] = new Array("Samsung", "LG", "Sony", "SempToshiba", "Panasonic", "AOC", "CCE", "Philips", "Sharp", "Toshiba", "Gradiente", "Philco", "Buster", "Hitachi", "Sanyo", "Blue Sky", "Mitsubishi", "Aiko", "Cineral", "JVC", "Zenith");
todasAsmarcas[2] = new Array("Samsung", "LG", "Sony", "SempToshiba", "Panasonic", "AOC", "CCE", "Philips", "Sharp", "Toshiba", "Gradiente", "Philco", "Buster", "Hitachi", "Sanyo", "Blue Sky", "Mitsubishi", "Aiko", "Cineral", "JVC", "Zenith");
todasAsmarcas[3] = new Array("Samsung", "LG", "Sony", "SempToshiba", "Panasonic", "AOC", "CCE", "Philips", "Sharp", "Toshiba", "Gradiente", "Philco", "Buster", "Semp", "Hitachi", "Sanyo", "Blue Sky", "Mitsubishi", "Aiko", "Cineral", "JVC", "Zenith");

function initial(x) {           
    document.getElementById("estiloId1").value=marca[index];            
    console.log(marca+"  MARCA---------");
    console.log(index+"  MEU INDEX--------");
    console.log(marca[index]+" MARCA + INDEX--------");
}

// --------------------------------------------- --- CODE marcaWebkit.htm

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<link href="webkit_CSS/menuWebkit1.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="controle.js"></script>      
<script type="text/javascript">
  window.onload = function(){           
     document.getElementById("img1").classList.add("menuHighlightON");
     console.log("teste");        
 }      
</script>   
</head>
<body >
<div id="myFrame" name="main">  
<div id="myDoc">
<p id=firstP>Pressione CONFIRMA na imagem correspondente ao controle remoto 
que deseja configurar para operar sua TV.</p>
    <img id="esq" name="esq" src="img/esq.png">
    <a href="#"  onclick="escolheControle(0)"><input type="image" id ="img1" 
name ="img1" src="img/transp.png"></a>
    <a href="#" onclick="escolheControle(1)"><input type="image" id ="img2" 
name ="img2" src="img/transp.png"></a>
    <a href="#" onclick="escolheControle(2)"><input type="image" id ="img3" 
name ="img3" src="img/transp.png"></a>
    <a href="#" onclick="escolheControle(3)"><input type="image" id ="img4" 
name ="img4" src="img/transp.png"></a>      
    <img id="dir" name="dir" src="img/dir.png">     
</div>
</div>      
<script src="http://webapp.local/apps/samba-ui/iapps-lib.min.js"></script><scriptsrc="webkit_JS/indexWebkit.js"></script> 
</body> 
</html>

Logs for analysis

  

Samsung, LG, Sony, SempToshiba, Panasonic, AOC, CCE, Philips, Sharp, Toshiba, Gradient, Philco, Buster, Hitachi, Sanyo, Blue   Sky, Mitsubishi, Aiko, Cineral, JVC, Zenith BRAND ---------   marcaWebkit.js: 40

     

1 MY INDEX -------- marcaWebkit.js: 41

     

the BRAND + INDEX --------

    
asked by anonymous 22.01.2018 / 17:48

0 answers