I have the following code which got an error. It says object not found.
My objective is to change the target URL when I click on the checkbox.
Any idea whether I can access the <a href> object ?
Thanks.
----------------------------------------------------------
<script language="JavaScript">
function AssignCheckBoxURL()
{
if (frmInput.C1.checked)
frmInput.link1.href = " else
frmInput.link1.href = "}
</script>
<body>
<form method=POST name=frmInput>
<p><input type="checkbox" name="C1" value="ON" onClick="AssignCheckBoxURL()">i am happy</p>
<p><a name=link1 href=" >congratulation</a></p>
</form>
My objective is to change the target URL when I click on the checkbox.
Any idea whether I can access the <a href> object ?
Thanks.
----------------------------------------------------------
<script language="JavaScript">
function AssignCheckBoxURL()
{
if (frmInput.C1.checked)
frmInput.link1.href = " else
frmInput.link1.href = "}
</script>
<body>
<form method=POST name=frmInput>
<p><input type="checkbox" name="C1" value="ON" onClick="AssignCheckBoxURL()">i am happy</p>
<p><a name=link1 href=" >congratulation</a></p>
</form>