• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 575
  • Last Modified:

Disabling the scroll bars of parent page

Experts is it possible to disable the scroll bars of a parent page to IFRAME in .aspx page...?
I thought  window.parent.document.style.overflow=hidden;  would work, but it does not.
0
dotnetpro
Asked:
dotnetpro
  • 4
  • 3
1 Solution
 
sunithnairCommented:
You can do the following in the parent page
<body style="margin: 0; overflow: hidden;" scroll="no">

Open in new window

0
 
dotnetproAuthor Commented:
My question was not quite clear. I am actually looking for a way to hide the scroll bars when i click on a hyperlink on the parent page to open a new page in IFRAME and scroll bars to appear back again when i close the pop up iframe window
0
 
sunithnairCommented:
try this
window.parent.document.body.style.overflow="hidden";

Open in new window

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
dotnetproAuthor Commented:
Nope it did not ..
0
 
sunithnairCommented:
Can you paste your code here so that i can have a look at it?
0
 
dotnetproAuthor Commented:
I am afraid i do not have code for disabling the scrollbars yet...but that is what i am trying to do.
I have a parent page in which i have placed an IFRAME. I have placed an href on the parent page , when clicked opens the targeted page in HREF. I have attached the code snipped at bottom. I am not sure if it would be enough.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IndexPage.aspx.cs" Inherits="IndexPage" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home Page</title>    
</head>
<body id="body1" runat="server">
    <form id="form1" runat="server">
        <!--
		The masthead area. Will contain flash applet
	-->
        
        <!--
		Main Content
	-->
        <div id="content">
            <!--
			Row
		-->
            <div class="row">
                <div class="column double">
                    <div class="how_we_can_help">
                        <a href="IndexPage.aspx?search=1" class="thickbox">                           
                                
                            <div class="clear">
                            </div>
                        </a>
                    </div>
                </div>
                <div id="greypage" style="z-index: 4; position: absolute; top: 0px; left: 0px; width: 100%;
                    height: 100%; background-color: #8B8682; visibility: hidden; filter: alpha(opacity=60);
                    opacity: 0.75;" runat="server"></div>
                <div id="previewloading" style="display: none; width: 800px; position: absolute;
                    top: 35px; height: 510px; white-space: nowrap; background-color: white; text-align: center;
                    z-index: 1000; right: 9%; position: absolute; left: 200px;" align="center" runat="server">
                    <iframe height="510px" scrolling="auto" width="800px" frameborder="0" id="ifrmsearch" 
                        runat="server" style="height: 510px; position:relative; margin:auto;" src="Content/Search/AdvanceSearch/AdvanceSearch.aspx">
                    </iframe>
                </div>
                
    </form>
</body>
</html>

Open in new window

0
 
dotnetproAuthor Commented:
I got this one to working by altering the style sheet and providing an onscroll event handler for the parent window.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now