Aşağıdaki Kodda 2 sorunum var arkadaşlar..
:: 1 onchange yapılınca sadece 1 tane olması gerekirken ilk selectboxda başka bir şey seçince defalarca selectbox yapıyor.
:: Oluşturulan yeni selectboxda onchange yaptığımda ise yeni bir selectbox yapması gerekiyor.
Burda nasıl bir şey yapılabilir?
<html>
<head>
<style>
body {margin:0px; padding:0px;}
* {margin:0px; padding:0px;}
html {margin:0px; padding:0px;}
select {margin:0px;}
.kutu {width:100px; border:1px solid #00bbcc; margin:5px; padding:3px; font-family:Tahoma; font-size:11px; font-weight:bold;}
#git {width:100px; border:1px solid #00bbcc; margin:5px;}
</style>
<script type="text/javascript">
function popBoxes(selid)
{
var sel = document.createElement('select');
var myform = document.getElementById('myform');
var kutukoy = myform.appendChild(sel);
sel.size = "3";
sel.name="alt";
sel.id= selid;
sel.className = "kutu";
optionx = document.createElement('option');
optionx.appendChild(document.createTextNode(selid));
sel.appendChild(optionx);
}
</script>
</head>
<body id="myform">
<select name="alt" onchange="return popBoxes(this.value)" size="3" class="kutu">
<option value="">Kategori Seçin</option>
<option value="1">Titus</option>
<option value="2">Justin</option>
<option value="3">Jeff</option>
<option value="4">Jeff</option>
<option value="5">Jeff</option>
<option value="6">Jeff</option>
<option value="7">Jeff</option>
</select>
</body>
</html>