Show Popup Window on Page Load Using JQuery in Asp.Net C#

Show Popup  Window on Page Load


Open Website Show Popup Window  on Page _Load Function Without Button Click Event Using in JQuery Asp.Net C#.

                                              DEMO




HTML CODING

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<style type="text/css">

.popup{
width: 100%;
margin: 0 auto;
display: none;
position: fixed;
z-index: 101;
}
.bor{
min-width: 600px;
width: 600px;
min-height: 350px;
margin: 100px auto;
background: #808080;
position: relative;
z-index: 103;
padding: 10px;
border-radius: 5px;
}
.bor .clo{
float: right;
height: 35px;
left: 22px;
position: relative;
top: -25px;
width: 34px;
}
#drizz {
position: fixed;
width: 100%;
height: 100%;
background-color: #FF9933;
display: none;
}
</style>
<script type='text/javascript'>
    $(function () {
        var overlay = $('<div id="drizz"></div>');
        overlay.show();
        overlay.appendTo(document.body);
        $('.popup').show();
        $('.close').click(function () {
            $('.popup').hide();
            overlay.appendTo(document.body).remove();
            return false;
        });
        $('.clo').click(function () {
            $('.popup').hide();
            overlay.appendTo(document.body).remove();
            return false;
        });
       
    });
</script>
</head>
<body>
<div class='popup'>
<div class='bor'>
<img src='~/image/drop.gif' alt='quit' runat="server" class='clo' id='x' />
<h2 align="centre" >
dotnetdrizzles.blogsopt.in Asp.Net C# Tutorials<br />
    C#<br />
    DataBase connection<br />
    GridView Control<br />
    Calender Control<br />
    Image Control<br />
    Data Controls<br />
    JQuery <br />
    JavaScripts<br />
    SQL Server
    <br/>
<br/>
<a href="" class='close'>Hide</a>
</h2>
</div>
</div>
</body>
</html>


First - Add New Web Form - Add Html Coding For  PopUp  & JQuery  For Close





Next - Run[F5]  Show Popup PageLoad








0 comments:

Post a Comment