S
staeri
I want to catch the value in "hidID" when the form on the page is
posted but I get an error message telling me "Object is required".
<asp:Content ID="Content1"
ContentPlaceHolderID="ContentPlaceHolderLeft" runat="server">
<script language="javascript">
var a1 = document.getElementById("hidID").value; -- THIS GIVES
ERROR MESSAGE --
function RadioClick(id)
{
a1 = id;
document.getElementById("hidID").value = a1;
if ( a1 == "p1")
{
document.getElementById("p1").style.display = "block";
document.getElementById("p2").style.display = "none";
}
else
{
document.getElementById("p1").style.display = "none";
document.getElementById("p2").style.display = "block";
}
}
</script>
Can someone please help me?
posted but I get an error message telling me "Object is required".
<asp:Content ID="Content1"
ContentPlaceHolderID="ContentPlaceHolderLeft" runat="server">
<script language="javascript">
var a1 = document.getElementById("hidID").value; -- THIS GIVES
ERROR MESSAGE --
function RadioClick(id)
{
a1 = id;
document.getElementById("hidID").value = a1;
if ( a1 == "p1")
{
document.getElementById("p1").style.display = "block";
document.getElementById("p2").style.display = "none";
}
else
{
document.getElementById("p1").style.display = "none";
document.getElementById("p2").style.display = "block";
}
}
</script>
Can someone please help me?