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="fstSiteLayo ut" rows="115,*,22" bordercolor="#d cdcdc"
frameborder="ye s" framespacing="1 ">
<frame id="frmMastHead Frame" scrolling="no" noresize
target="frmCont entFrame" src="./Aspx_Data/WikiTech_Site/masthead.aspx"
/>
<frameset id="fstMainLayo ut" cols="216,*" frameborder="ye s"
framespacing="3 ">
<frameset id="fstNavigati onLayout" rows="102,*"
framespacing="0 " frameborder="no ">
<frame id="frmQuickSea rchFrame" scrolling="no"
src="./Aspx_Data/WikiTech_Site/quicksearch.asp x" />
<frame id="frmNavTreeF rame" scrolling="auto "
target="frmCont entFrame" src="./Aspx_Data/WikiTech_Site/navtree.aspx"
/>
</frameset>
<frame id="frmContentF rame" frameborder="no "
bordercolor="#0 03399" src="./Aspx_Data/WikiTech_Site/main.aspx" />
</frameset>
<frame id="frmDiscussT hreadFrame" scrolling="no" noresize
target="frmCont entFrame"
src="./Aspx_Data/WikiTech_Site/discussthread.a spx" />
</frameset>
</html>
Then on the discussthread.a spx page (frame id of
"frmDiscussThre adFrame"), there is a button there that when clicked, it
will call the javascript function below:
function jsfToggleDiscus sionFrame()
{
var fstSiteLayout =
window.parent.d ocument.getElem entById("fstSit eLayout");
var frmDiscussThrea dFrame =
window.parent.d ocument.getElem entById("frmDis cussThreadFrame ");
var intRowSize =
fstSiteLayout.r ows.substring(f stSiteLayout.ro ws.lastIndexOf( ',') + 1);
if (intRowSize != 22)
{
fstSiteLayout.r ows="115,*,22";
frmDiscussThrea dFrame.scrollin g="no";
frmDiscussThrea dFrame.noResize =true;
}
else
{
fstSiteLayout.r ows="115,*,115" ;
frmDiscussThrea dFrame.scrollin g="auto";
frmDiscussThrea dFrame.noResize =false;
}
}
The javascript function works on expanding & restoring the
"frmDiscussThre adFrame" frame without a problem.
My problem is that when the frame is on "expanded" form, scrollbars
wont show up, even if the discussthread.a spx page has a lot of content
in it. I'm really in a stump here.
Tha javascript code looks correct though:
fstSiteLayout.r ows="115,*,115" ;
frmDiscussThrea dFrame.scrollin g="auto";
frmDiscussThrea dFrame.noResize =false;
I've tried frmDiscussThrea dFrame.scrollin g="yes"; too but still,
scrollbar for the discussthread.a spx page won't show up.
What I notice is that when the frame definition of the frame id:
"frmDiscussThre adFrame" has been remove of the scrolling="no" tag, the
javascript works! I will have scrollbars when on "expanded" form.
<frame id="frmDiscussT hreadFrame" noresize target="frmCont entFrame"
src="./Aspx_Data/WikiTech_Site/discussthread.a spx" />
So my impression on this is that you cannot define the javascript
frmDiscussThrea dFrame.scrollin g="auto"; or
frmDiscussThrea dFrame.scrollin g="yes"; on demand.
Is this true? Or I've made a mistake somewhere?
Thanks,
Henry :)