Click here to Skip to main content
15,907,236 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Some info to end user in Model popup extender.. when user hit the default page i want to show the Model popup automatically but after the 15 sec of page load not in page load... Plz help me for that?
Posted
Updated 2-Jun-14 23:27pm
v2

try this.. :)

set this link of jQuery

<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
Javascript
JavaScript
$(document).ready(function () {

           setTimeout(function () { $("#dialog").fadeIn(); }, 15000)

       });

       function Close() {
           $("#dialog").fadeOut();
       }


HTML

HTML
<div id="dialog" style="display: none">
           <div style="height: 170px">
               This is a simple popup
           </div>
           <div>
               <span  önclick="Close()">click to Close</span></div>
       </div>


CSS

CSS
#dialog
       {
           height: 200px;
           width: 200px;
           background-color: #c8c8c8;
           border: 1px solid black;
           position: fixed;
           top: 50%;
           margin-top: -100px;
           left: 50%;
           margin-left: -100px;
           display: none;
           padding: 20px;
       }
 
Share this answer
 
v2
Comments
SnvMohan 3-Jun-14 5:17am    
If i want to show model extender in 15 sec means how to show model pop up extender in jquery?
Nirav Prabtani 3-Jun-14 5:48am    
See my updated solution.. :)
SnvMohan 3-Jun-14 5:54am    
I am using Ajax model pop up extender.
The following jQuery should display a panel/div/container 15 seconds after page load.

JavaScript
$(document).ready(function() {
   // Show the div in 15s
   $('#panelid').delay(15000).fadeIn(500);
});



Or, to show an asp.net ajaxcontroltoolkit modal popup in the same manner:

JavaScript
$(document).ready(function() {
    setTimeout(function(){$find('modalpopupextenderBehaviourID').show();}, 15000);
});


.. hope it helps.
 
Share this answer
 
v2
Comments
SnvMohan 3-Jun-14 5:06am    
If i want to show model extender in 15 sec means how to show model pop up extender in jquery?
hypermellow 3-Jun-14 6:15am    
I've updated my solution to show an ASP.NET modal popup extender example.
SnvMohan 3-Jun-14 8:31am    
Thank you.. its working....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900