Java Script - Visible and Hide HTML Control


1] FormA.asp



<SCRIPT LANGUAGE="JavaScript">

function ShowMenu() {
 var command = "xxtemplate.asp"
 parent.Command.document.location.replace(command);
}


function SelectName() {
var popup;
popup = window.open("Ask_Another_Details.asp", "", resizable = 1, "width=300,height=100");
popup.focus();
    }

function ShowHideDiv() {
 var chkYes = document.getElementById("chkYes");
 var tdManage = document.getElementById("tdManage");


 if (chkYes.checked == true)
 {
  tdDiscManage.style.display = "block";
 }
 else
 {
  tdDiscManage.style.display = "none";
 }


function ValidateForm() {
  var form = document.getElementById("frmFormA");

    if((form.cbSelect1.checked ==false) && (form.cbSelect2.checked ==false) && (form.cbSelect3.checked ==false))
  {
   alert("Please Select any options (1), (2) or (3)?");
   return false;
  }
  else
  {
   var cbSelect = document.forms[0];
   var txt = "";
   var i;
   val = false;
    for (i = 0; i < cbSelect.length; i++)
    {
     if (cbSelect[i].checked)
     {
      txt = txt + cbSelect[i].value + "\n";
      val = true;
     }
    }
    alert("You have selected these options as: \n" + txt);
   return true;
  }
 }

</SCRIPT>



<html>
<head>
<title>Visible and Hide HTML Control Using Java Script</title>
</head>
<body>


<form action="Test.asp" name="frmFormA" method="post">
<TABLE cellSpacing=5>
   
 <tr>
 <td bgcolor="#eeeeee" id = "tdManage" >
  <div id="DivManage" >
   <Strong>
    <font face="Garamond">

I hereby certify that: <BR>
(Please check all that apply) <BR>
<input type="checkbox" value="1" name="cbSelect1">
(1) Question1; <BR>

<input type="checkbox" value="2" name="cbSelect2">
(2) Question2;<BR>

<input type="checkbox" value="3" name="cbSelect3">
(3) Question3.<BR>
    </font >
   </Strong>
  </div>
 </td>
 </tr>
 <tr>
  <td><INPUT id=cmd_Submit name=cmd_Submit value="Submit" type="Submit"></td>
 </tr>
 </table>
</form>

</BODY>
</HTML>









Comments

Popular posts from this blog

PUTTY - The server's host key is not cached in the registry cache

OIM-12c Installation - FMW - SOA - IDM

SAML & OAuth 2.0