Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, November 1, 2010 7:45 AM
Hi,
**when i call modal popup extender the background is scrolling , i want to freeze the background page then
is there any properties or any other idea to get this .. **
All replies (5)
Monday, November 1, 2010 9:28 AM âś…Answered
The link points to a third party control and not ajax control toolkit and hence it is not possible to achieve those results using ajax control toolkit.
Monday, November 1, 2010 8:10 AM
You need to set the BackGround CSS class refer here
http://forums.asp.net/p/1585247/4004061.aspx
Monday, November 1, 2010 8:15 AM
Hi
Try this this code will help you..!
1. HTML code and A tag attributes
<!-- #dialog is the id of a DIV defined in the code below -->
<a href="#dialog" name="modal">Simple Modal Window</a>
<div id="boxes">
<!-- #customize your modal window here -->
<div id="dialog" class="window">
<b>Testing of Modal Window</b> |
<!-- close button is defined as close class -->
<a href="#" class="close">Close it</a>
</div>
<!-- Do not remove div#mask, because you'll need it to fill the whole screen -->
<div id="mask"></div>
</div>
2. CSS code
<style>
/* Z-index of #mask must lower than #boxes .window */
#mask {
;
z-index:9000;
background-color:#000;
display:none;
}
#boxes .window {
;
width:440px;
height:200px;
display:none;
z-index:9999;
padding:20px;
}
/* Customize your modal window here, you can add background image too */
#boxes #dialog {
width:375px;
height:203px;
}
</style>
3. Javascript
<script>
$(document).ready(function() {
//select all the a tag with name equal to modal
$('a[name=modal]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
//Get the A tag
var id = $(this).attr('href');
//Get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();
//Set height and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});
//transition effect
$('#mask').fadeIn(1000);
$('#mask').fadeTo("slow",0.8);
//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();
//Set the popup window to center
$(id).css('top', winH/2-$(id).height()/2);
$(id).css('left', winW/2-$(id).width()/2);
//transition effect
$(id).fadeIn(2000);
});
//if close button is clicked
$('.window .close').click(function (e) {
//Cancel the link behavior
e.preventDefault();
$('#mask, .window').hide();
});
//if mask is clicked
$('#mask').click(function () {
$(this).hide();
$('.window').hide();
});
});
</script>
for help refer following link
http://www.queness.com/post/77/simple-jquery-modal-window-tutorial
Regards
Pankaj
Mark as a ANSWER if it helps you..!
Monday, November 1, 2010 9:04 AM
Thank you for response,
Here is the link for sample example for what i need ,
http://demos.devexpress.com/ASPxperienceDemos/PopupControl/ModalWindow.aspx
in this example background disable and not scrolling
Please see this and give an idea like this ...
Monday, November 1, 2010 11:26 PM
Please refer this