khanat-opennel-code/code/web/public_php/api/data/js/combobox.js
2014-08-18 07:13:15 +05:30

17 lines
417 B
JavaScript

function comboInit(thelist)
{
theinput = document.getElementById(theinput);
var idx = thelist.selectedIndex;
var content = thelist.options[idx].value;
if(theinput.value == "")
theinput.value = content;
}
function combo(thelist, theinput)
{
theinput = document.getElementById(theinput);
var idx = thelist.selectedIndex;
var content = thelist.options[idx].value;
theinput.value = content;
}