Avatar of vidhubala
vidhubala

asked on 

modal window

i am looking for a modal popup.
when i click on "show pop" button the popup shows. and click on close button it closes.
i want the popup to be modal so that when its on top i should not be able to click on the parent.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <SCRIPT LANGUAGE="JavaScript">
  <!--
	function show(lay) { 
		document.getElementById('mod').style.display="";
	}
	function hide(lay) { 		
		 document.getElementById('mod').style.display="none";	
	}
  //-->
  </SCRIPT>
 </HEAD>
 
 <BODY>
 <DIV id="mod" style="display:none;left:500px;top:120px;Z-INDEX: 500;position:absolute;border:5px solid red;background-color:white">
      <TABLE>
      <TR>
		<TD>First Name:</TD>
		<TD><INPUT TYPE="text" NAME=""></TD>
      </TR>
      <TR>
	  <TR>
		<TD>Last Name:</TD>
		<TD><INPUT TYPE="text" NAME=""></TD>
      </TR>
      </TR>
	  <tr>
	  <td colspan="2"><input type="button" value="close" onclick="hide('mod')"/></td>
	  </tr>
      </TABLE>
    </DIV>
  <TABLE width="800px" border="1">
	  <TR>
		<TD><INPUT TYPE="text" NAME=""></TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD><INPUT TYPE="text" NAME=""></TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD>dasd</TD>
		<TD>dasd</TD>
	  </TR>
	  <TR>
		<TD colspan="2" align="right">
			<INPUT onclick='show("mod");' type=button value="show pop">
		</TD>
	  </TR>
  </TABLE>
 </BODY>
</HTML>

Open in new window

JavaScript

Avatar of undefined
Last Comment
vidhubala

8/22/2022 - Mon