Hello,
i try to get the value from a radio box in a input box
<form action="test()">
<input type="radio" name="typ" id="typ" value="ws" onfocus="test()" checked> ws
<input type="radio" name="typ" id="typ2" value="nb" onfocus="test()"> nb
<input type="radio" name="typ" id="typ3" value="za" onfocus="test()"> za
<input type="radio" name="typ" id="typ4" value="zb" onfocus="test()"> zb
</form>
And here is my js:
<script type="text/javascript">
function test(){
document.getElementById('serverid').value=document.getElementById('typ').value;
}
function test(){
document.getElementById('serverid').value=document.getElementById('typ2').value;
}
function test(){
document.getElementById('serverid').value=document.getElementById('typ3').value;
}
function test(){
document.getElementById('serverid').value=document.getElementById('typ4').value;
}
</script>
This is my Inputbox and here i will get the value of the radio boxes:
<input type="text" style="background-color:#ffffff" size="15" name="ID" id="serverid">
But so it is everytime zb in the inputbox but i will choose :-) I hope you unterstand me, i'm sry for my english.
I hope some one can help me.