i want select one checkbox from 3 checkbox and display div if none is
seletced hide div in simple javascript
i am able to select any one checkbox but i am displaying div more time as
i select checkbox here is the check box: 12.12.12.12
12.12.12.13
This div i want to display as check any one checkbox: NONE / g729/ ulaw
This is the function:
function ipSelected(el)
{
if(el.checked)
{
document.getElementById("IP_none").checked=false;
if(last_ip_id!="" && last_ip_id!=el.id && (
document.getElementById('system').value=='voipswitch' ||
document.getElementById('system').value=='asterisk' ||
document.getElementById('system').value=='ipsmarx')){try {
document.getElementById(last_ip_id).checked=false;}catch(e){}}
last_ip_id = el.id;
document.getElementById("vp_" + el.value).style.display="block";
// Set destination value
if((document.getElementById('system').value=='voipswitch')
||
(document.getElementById('system').value=='asterisk'
||
document.getElementById('system').value=='ipsmarx'))
{
document.getElementById('dest_span').innerHTML =
"@" + el.getAttribute("IP") + ":" +
el.getAttribute("PORT");
document.theForm.idiplist.value = el.value;
}
}
}
No comments:
Post a Comment