Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Frames - no scrollbar

Reply
Thread Tools

Frames - no scrollbar

 
 
wardemon
Guest
Posts: n/a
 
      12-03-2006
Hi all,

I have a frame layout of my site as follows:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>WikiTech</title>
</head>
<frameset id="fstSiteLayout" rows="115,*,22" bordercolor="#dcdcdc"
frameborder="yes" framespacing="1">
<frame id="frmMastHeadFrame" scrolling="no" noresize
target="frmContentFrame" src="./Aspx_Data/WikiTech_Site/masthead.aspx"
/>
<frameset id="fstMainLayout" cols="216,*" frameborder="yes"
framespacing="3">
<frameset id="fstNavigationLayout" rows="102,*"
framespacing="0" frameborder="no">
<frame id="frmQuickSearchFrame" scrolling="no"
src="./Aspx_Data/WikiTech_Site/quicksearch.aspx" />
<frame id="frmNavTreeFrame" scrolling="auto"
target="frmContentFrame" src="./Aspx_Data/WikiTech_Site/navtree.aspx"
/>
</frameset>
<frame id="frmContentFrame" frameborder="no"
bordercolor="#003399" src="./Aspx_Data/WikiTech_Site/main.aspx" />
</frameset>
<frame id="frmDiscussThreadFrame" scrolling="no" noresize
target="frmContentFrame"
src="./Aspx_Data/WikiTech_Site/discussthread.aspx" />
</frameset>
</html>

Then on the discussthread.aspx page (frame id of
"frmDiscussThreadFrame"), there is a button there that when clicked, it
will call the javascript function below:

function jsfToggleDiscussionFrame()
{
var fstSiteLayout =
window.parent.document.getElementById("fstSiteLayo ut");
var frmDiscussThreadFrame =
window.parent.document.getElementById("frmDiscussT hreadFrame");
var intRowSize =
fstSiteLayout.rows.substring(fstSiteLayout.rows.la stIndexOf(',') + 1);
if (intRowSize != 22)
{
fstSiteLayout.rows="115,*,22";
frmDiscussThreadFrame.scrolling="no";
frmDiscussThreadFrame.noResize=true;

}
else
{
fstSiteLayout.rows="115,*,115";
frmDiscussThreadFrame.scrolling="auto";
frmDiscussThreadFrame.noResize=false;

}
}

The javascript function works on expanding & restoring the
"frmDiscussThreadFrame" frame without a problem.

My problem is that when the frame is on "expanded" form, scrollbars
wont show up, even if the discussthread.aspx page has a lot of content
in it. I'm really in a stump here.

Tha javascript code looks correct though:
fstSiteLayout.rows="115,*,115";
frmDiscussThreadFrame.scrolling="auto";
frmDiscussThreadFrame.noResize=false;
I've tried frmDiscussThreadFrame.scrolling="yes"; too but still,
scrollbar for the discussthread.aspx page won't show up.

What I notice is that when the frame definition of the frame id:
"frmDiscussThreadFrame" has been remove of the scrolling="no" tag, the
javascript works! I will have scrollbars when on "expanded" form.

<frame id="frmDiscussThreadFrame" noresize target="frmContentFrame"
src="./Aspx_Data/WikiTech_Site/discussthread.aspx" />

So my impression on this is that you cannot define the javascript
frmDiscussThreadFrame.scrolling="auto"; or
frmDiscussThreadFrame.scrolling="yes"; on demand.

Is this true? Or I've made a mistake somewhere?

Thanks,
Henry

 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      12-03-2006
wardemon a écrit :
>
> function jsfToggleDiscussionFrame()
> {
> var fstSiteLayout =
> window.parent.document.getElementById("fstSiteLayo ut");
> var frmDiscussThreadFrame =
> window.parent.document.getElementById("frmDiscussT hreadFrame");
> var intRowSize =
> fstSiteLayout.rows.substring(fstSiteLayout.rows.la stIndexOf(',') + 1);
> if (intRowSize != 22)
> {
> fstSiteLayout.rows="115,*,22";
> frmDiscussThreadFrame.scrolling="no";
> frmDiscussThreadFrame.noResize=true;


This last line would have to mean nothing
(not important as you want resising)

> }
> else
> {
> fstSiteLayout.rows="115,*,115";
> frmDiscussThreadFrame.scrolling="auto";
> frmDiscussThreadFrame.noResize=false;


Wouldn't it have to be :
frmDiscussThreadFrame.noresize=false;

> }
> }
>
> The javascript function works on expanding & restoring the
> "frmDiscussThreadFrame" frame without a problem.


a chance ?

> My problem is that when the frame is on "expanded" form, scrollbars
> wont show up, even if the discussthread.aspx page has a lot of content
> in it. I'm really in a stump here.
>
> Tha javascript code looks correct though:
> fstSiteLayout.rows="115,*,115";
> frmDiscussThreadFrame.scrolling="auto";
> frmDiscussThreadFrame.noResize=false;


try :
frmDiscussThreadFrame.removeAttribute("noresise");

and don't forget to set it back in first condition
frmDiscussThreadFrame.setAttribute("noresise","nor esize");
or ?
frmDiscussThreadFrame.setAttribute("noresise","tru e");

> I've tried frmDiscussThreadFrame.scrolling="yes"; too but still,
> So my impression on this is that you cannot define the javascript
> frmDiscussThreadFrame.scrolling="auto"; or
> frmDiscussThreadFrame.scrolling="yes"; on demand.


and with setAttribute ?
frmDiscussThreadFrame.setAttribute("scrolling","ye s");




--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
 
Reply With Quote
 
 
 
 
wardemon
Guest
Posts: n/a
 
      12-04-2006
Hi,
Thanks for the tip. I've tried your suggestions but still it wont
work. Here's a quick excersise example of my problem:
I still can't have the noresize and the scrolling property of the
frame object to work. I'm using IE6 on Windows XP Service Pack 2

Thanks,
Henry

framed_site.html
======
<html>
<frameset cols="50%,50%">
<frame id="leftFrame" src="frame_scroll.htm">
<frame id="rightFrame" noresize scrolling="no" src="frame_a.htm">
</frameset>
</html>

frame_scroll.htm
=======
<html>
<head>
<script type="text/javascript">
function enableScrolling()
{
window.parent.document.getElementById("rightFrame" ).scrolling="yes";
window.parent.document.getElementById("rightFrame" ).noresize=false;
}
function disableScrolling()
{
window.parent.document.getElementById("rightFrame" ).scrolling="no";
window.parent.document.getElementById("rightFrame" ).noresize=true;
}
</script>
</head>
<body>
<input type="button" onclick="enableScrolling()" value="Scroll bars &
Resize" />
<input type="button" onclick="disableScrolling()" value="No scroll bars
& NoResize" />
</body>
</html>


frame_a.htm
=========
<html>
<head>
</head>
<body>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
Some Text Here <br>
</body>
</html>

 
Reply With Quote
 
ASM
Guest
Posts: n/a
 
      12-04-2006
wardemon a écrit :
> I still can't have the noresize and the scrolling property of the
> frame object to work. I'm using IE6 on Windows XP Service Pack 2


I'm very sorry for you.

I think you'll have to move border inter-frames to excite IE
(Opera needs that too)
(Safari and iCab do nothing with theses scroll and co)

framed_site.html
======
<html>
<frameset id="general" cols="50%,50%">
<frame id="leftFrame" src="frame_scroll.htm">
<frame id="rightFrame" noresize scrolling="no" src="frame_a.htm">
</frameset>
</html>

frame_scroll.htm
=======
<html>
<head>
<script type="text/javascript">
function enableScrolling()
{
var target = parent.document.getElementById("rightFrame");
target.scrolling='yes';
target.removeAttribute('noresize');
// move your bottom you IE and others !
parent.document.getElementById("general").setAttri bute('cols','51%,49%');
setTimeout(
'parent.document.getElementById("general").setAttr ibute("cols","50%,50%")',
50);
}
function disableScrolling()
{
var target = parent.document.getElementById("rightFrame");
target.setAttribute('noresize',true);
// or ?
// target.noresize=true;
target.scrolling='no';
// move your bottom you IE and others !
parent.document.getElementById("general").setAttri bute('cols','51%,49%');
setTimeout(
'parent.document.getElementById("general").setAttr ibute("cols","50%,50%")',
50);
}
</script>
</head>
<body>
<input type="button" onclick="enableScrolling()" value="Scroll bars &
Resize" />
<input type="button" onclick="disableScrolling()" value="No scroll bars
& NoResize" />
</body>
</html>


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
 
Reply With Quote
 
wardemon
Guest
Posts: n/a
 
      12-07-2006
found the answer by using document.body.scroll

function jsfToggleDiscussionFrame()
{
var fstSiteLayout =
window.parent.document.getElementById("fstSiteLayo ut");
var frmDiscussThreadFrame =
window.parent.document.getElementById("frmDiscussT hreadFrame");
var intRowSize =
fstSiteLayout.rows.substring(fstSiteLayout.rows.la stIndexOf(',') + 1);
if (intRowSize != 22)
{
fstSiteLayout.rows="115,*,22";
frmDiscussThreadFrame.scrolling="no"; //does not work for some
reason
frmDiscussThreadFrame.noResize=true; //disables resizing of
discussion frame
document.body.scroll = "no"; //hides scrollbars
}
else
{
fstSiteLayout.rows="115,*,115";
frmDiscussThreadFrame.scrolling="auto"; //does not work for
some reason
frmDiscussThreadFrame.noResize=false; //enable resizing of
discussion frame
document.body.scroll = "yes"; //displays scrollbars
}
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about horizontal scrollbar in frames Michael Weis HTML 13 08-12-2006 08:50 AM
Frames and scrollbar question. davemitc@gmail.com HTML 3 04-15-2006 11:34 PM
2 Frames, 1 Scrollbar for both, Possible? ws HTML 3 08-20-2005 06:56 PM
ScrollBar? Does it exist just WEB ScrollBar Control? Alex ASP .Net Web Controls 1 04-04-2004 12:44 AM
How to include multiple frames in frameset without predefined dimensions/vertical scrollbar Don Schneider HTML 0 06-27-2003 03:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57