Hi Friends,
I created a 3 series radio button on page. when users checked one ID radio button, system will display a
Invisibl[ changed to visible] input box to ask user enter data. I used a javaScript to control. It is not work.From explore status button-it show
that object expected. How to fix this error. It seems the function does not fired when users check that radio button.
Thanks for any help
Jimmy
--my code--
<html><head><title></title>
<style>
.Invisible
{
visibility: hidden;
}
.Visible
{
visibility: visible;
}
</style>
<script language="JavaScript">
function changeVisibility(s) {
alert("how are u");
txtValue=s.value;
alert("get value---" + txtValue=s.value);
var ttxtValue = document.activeoption.ms_report.value;
alert("get value2222---" + txtValue=s.value);
if ( (txtValue == "Client") || (txtValue == "Product") ){
document.getElementById("p_txtValue1").className="Visible";
} else {
document.getElementById("p_txtValue1").className="Invisible";
}
}
</script>
</head>'
<form method="post" name="activeoption" action="result.html" >;
<input type="radio" name="ms_report" value="Group" ">
<b>One Client</b>;
<input type="radio" name="ms_report" value="Company" )">
<b>One Client</b>;
<input type="radio" name="ms_report" value="Show Client" onclick="changeVisibility(this)">
<b>One Client</b>;
<input type="text" name="ms_client_id" id="p_txtValue1" size="6" maxlength="6">;
</form></html>
I created a 3 series radio button on page. when users checked one ID radio button, system will display a
Invisibl[ changed to visible] input box to ask user enter data. I used a javaScript to control. It is not work.From explore status button-it show
that object expected. How to fix this error. It seems the function does not fired when users check that radio button.
Thanks for any help
Jimmy
--my code--
<html><head><title></title>
<style>
.Invisible
{
visibility: hidden;
}
.Visible
{
visibility: visible;
}
</style>
<script language="JavaScript">
function changeVisibility(s) {
alert("how are u");
txtValue=s.value;
alert("get value---" + txtValue=s.value);
var ttxtValue = document.activeoption.ms_report.value;
alert("get value2222---" + txtValue=s.value);
if ( (txtValue == "Client") || (txtValue == "Product") ){
document.getElementById("p_txtValue1").className="Visible";
} else {
document.getElementById("p_txtValue1").className="Invisible";
}
}
</script>
</head>'
<form method="post" name="activeoption" action="result.html" >;
<input type="radio" name="ms_report" value="Group" ">
<b>One Client</b>;
<input type="radio" name="ms_report" value="Company" )">
<b>One Client</b>;
<input type="radio" name="ms_report" value="Show Client" onclick="changeVisibility(this)">
<b>One Client</b>;
<input type="text" name="ms_client_id" id="p_txtValue1" size="6" maxlength="6">;
</form></html>