javascript popup window

      Comments Off on javascript popup window

javascript popup window

javascript popup window

javascript popup window tutorial is focusing on the mostly used in most of the website to display popup for more options / login / logout. Here is the complete code which you can use for displaying popup window using javascript. JavaScript is client side scripting language used for most of the task which can be performed at client side. For more sample code on JavaScript click here.

File: index.php

<?php  
//javascript popup window ?>

<html>
	<head>
		<title>	javascript popup window</title>
		
		<style>
    .black_color_css{
        display: none;
        position: absolute;
        top: 0%;
        left: 0%;
        width: 100%;
        height: 100%;
        background-color: black;
        z-index:1001;
        -moz-opacity: 0.8;
        opacity:.80;
        filter: alpha(opacity=80);
    }
    .white_content {
        display: none;
        position: absolute;
        top: 0%;
        left: 80%;
        width: 19%;
        height: 20%;
        padding: 1px;
        border: 1px solid green;
        background-color: white;
        z-index:1002;
        overflow: auto;
    }
</style>

	</head>
	<body>
	<center><h2>	javascript popup window </h2></center>
	
	
	
	<div style="float:right">
	
		<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade_div').style.display='block'">More Options</a></p>
		
	</div>
	
    <div id="light" class="white_content">Click on following link to logout 
	
	<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade_div').style.display='none'"> Logout </a></div>
	
	
    <div id="fade_div" class="black_color_css"></div>
	</body>
	
	
</html>






 

Output 1

javascript popup window

Output 2

javascript popup window