Hi !!
i faced problem with javascript. When I call function change() it applies only second element that is link2. I wanted when i click the link, the link name must appear to textfield.can anyone help??
here is code:
<html>
<body>
<form>
<a id="static" href="staticContentAdmin.ioml">link1</a></br>
<a id="static" href="staticContentAdmin.ioml">link2</a></br>
<input type="text" id="spec" name="content"/>
</form>
<script>
var a = document.getElementsByTagName("a");
for(var i=0;i<a.length;i++){
a[i].href="#";
var ale = a[i].innerHTML;
a[i].onclick =change(ale);
}
function change(object){
var inputobj = document.getElementById("spec");
inputobj.value = object;
}
</script>
</body>
</html>