I have button and <input type="button" onclick="test();" value="dugme"/> wont call test()
with alert(bla bla) directly works,but wont call my functions
why????????????????
here's the complete code
<html>
<head>
<title>moje vezbanje</title>
</head>
<body onload="alert('sdfsfd')">
<script type="text/javascript">
//alert("jhgfgh");
function klasa() {
var nazivLinka = document.getElementById("prvo").value;
var url = document.getElementById("drugo").value;
//alert(nazivLinka);
//druga.createNode(input type="text" value="pocetni text");
function dodajLink() {
var link = document.createNode("a");//1 kreir element
link.innerHTML = nazivLinka;//2 dodaj atribute
link.href = url;
document.getElementById("prva_kol").appendChild(link);//3 dodaj element na stranu
}
function test() {
alert('123123');
}
function pozicija(id1,x,y) {
id1.
}
*/
}
</script>
<script>
var a = new klasa();
</script>
<table id="tabela" style="background-color:yellow; length:100%; width:100%;">
<tr>
<td id="prva_kol" style="background-color:magenta; width:300px; height:300px;">11
</td>
<td id="druga_kol" style="background-color:red;">
<input type="text" id="prvo" value="naziv linka"/>
<input type="text" id="drugo" value="http://"/>
<input type="button" onclick="test();" value="dugme"/>
</td>
<td style="background-color:blue;">33</td>
</tr>
</table>
</body>
</html>