html part:
<body onload="init();firstInit();">
script part:
function init(){
var tb = new Ext.Toolbar({
renderTo: 'toolbar',
height: 25
});
var ht='<table><tr>';
ht+='<td>';
ht+='<div class="font">Mode : </div>';
ht+='</td>';
ht+='<td id="visumode.container">';
ht+='<select id="visuMode.select" size="1" onchange="fRefresh();">';
ht+='<option value="Direct">Direct</option>';
ht+='</select>';
ht+='</td>';
ht+='</tr></table>';
span = document.createElement("span");
span.innerHTML= ht;
tb.addElement(span);
}
function firstInit(){
var d document.getElementById("visumode.container");
alert(d)
}
this is a small part of the code, in the html part the result are put in a form. the alert is null why?
var d document...should bevar d = document.... Next time mark an answer as accepted and create a new question instead of changing your entire question.