Click here to Skip to main content
14,971,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
can anybody tell me how to hide the scroll bar of browser when image is displaying on model popup box? i am using master page concept, images are on content page.
thanks in advance.
Posted

Put this code in your page.
it will remove both scroll bars from your page

XML
<script type="text/javascript">
$(document).ready(function() {
    $("body").css("overflow", "hidden");
    $("body").css("overflow-x", "hidden");
    $("body").css("overflow-y", "hidden");
});
</script>
   
Comments
Raje_ 4-Jul-12 3:18am
   
thanks tejas for reply, can you please tell me how can i call this function on imagebutton onclientclick event.
Just put this CSS in your stylesheet for both master & content page:
CSS
body{
overflow:hidden;
}
   
Comments
Raje_ 4-Jul-12 2:04am
   
thanks for reply but this code will hide the scroll bar for page even when image is not displaying on model popup box, i dont want that, i want to work this code only when any user clicks the image and image displays on model pop up box.
Sandeep Mewara 5-Jul-12 2:19am
   
Put this on modal window css!
Raje_ 5-Jul-12 3:46am
   
thanks, i solved it by javascript function.
Sandeep Mewara 5-Jul-12 4:14am
   
Welcome.

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