Hello guys!
This is my problem:
I have a
html table with two div# layers in it div#experience1 and div#test1
i'm using a jsscript to hide show each div the code is:
function hideShow()
{
var obj,args=hideShow.arguments;
switch(args[0])
{
case "1":
var arg1="experience" + args[0];
arg1=document.getElementById(arg1);
var arg2="experience" + 2;
arg2=document.getElementById(arg2);
arg1.style.visibility="visible";
arg1.style.display="block";
arg2.style.visibility="hidden";
arg2.style.display="none";
break;
case "2":
var arg1="experience" + args[0];
arg1=document.getElementById(arg1);
var arg2="experience" + 1;
arg2=document.getElementById(arg2);
//arg1.style.visibility="visible";
//arg1.style.display="block";
arg2.style.visibility="hidden";
arg2.style.display="none";
break;
}
}
function hideShow2()
{
var obj,args=hideShow.arguments;
switch(args[0])
{
case "1":
var arg1="test" + args[0];
arg1=document.getElementById(arg1);
var arg2="test" + 2;
arg2=document.getElementById(arg2);
arg1.style.visibility="visible";
arg1.style.display="block";
arg2.style.visibility="hidden";
arg2.style.display="none";
break;
case "2":
var arg1="test" + args[0];
arg1=document.getElementById(arg1);
var arg2="test" + 1;
arg2=document.getElementById(arg2);
//arg1.style.visibility="visible";
//arg1.style.display="block";
arg2.style.visibility="hidden";
arg2.style.display="none";
break;
}
}
</script>
the first set of radio buttons call function hideShow and work fine, here is the code:
<input name="job" type="radio" onClick="javascript
:hideShow('1');" value="0">
<input name="job" type="radio" onClick="javascript
:hideShow('2');" value="1" checked>
on the other hand the second set of radio buttons that call function hideShow2 don't work at all.
what am i doing wrong?
Please help