www.webdeveloper.com
Results 1 to 3 of 3

Thread: Referencing Frame Attributes

  1. #1
    Join Date
    Feb 2003
    Location
    UK
    Posts
    7

    Angry Referencing Frame Attributes

    I've still not got the hang of frame refs so this is driving me mad trying different permutations.

    In the Header frame there is a button with an onclick javascript to reference a function in the parent frame (brought in by Ops_Cen_Script_Control.js). That gets invoked OK.

    I'm stuck trying to set the col attribute in the Left frame. I need to dynamically resize it to zero width so that the Right & RightHeader frames take up the whole width.

    <HTML>
    <HEAD>
    <SCRIPT src="Ops_Cen_Script_Cookies.js";></SCRIPT>
    <SCRIPT src="Ops_Cen_Script_Control.js";></SCRIPT>
    <!-- Created with AOLpress/2.0 -->
    <LINK REL=stylesheet HREF="Ops_Cen_Style_Guide.css" TYPE="text/css">
    </HEAD>
    <FRAMESET FRAMEBORDER="0" FRAMESPACING="0" ROWS="62,1*">
    <FRAME SRC="Header.htm" NAME="Header" SCROLLING="No" NORESIZE>
    <FRAMESET FRAMEBORDER="0" FRAMESPACING="0" COLS="50%,50%">
    <FRAMESET FRAMEBORDER="0" FRAMESPACING="0" ROWS="100%,1,1*">
    <FRAME SRC="blank.htm" NAME="Left" MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE>
    <FRAME SRC="frmPage.htm" NAME="frmPageView" SCROLLING="No" NORESIZE>
    <FRAME SRC="bldPage.htm" NAME="bldPageView" SCROLLING="No" NORESIZE>
    </FRAMESET>
    <FRAMESET ROWS="19%,83%">
    <FRAME SRC="RightHeader.htm" NAME="RightHeader" SCROLLING="No" NORESIZE>
    <FRAME SRC="blank.htm" NAME="Right" MARGINWIDTH="15" MARGINHEIGHT="15" NORESIZE>
    </FRAMESET>
    </FRAMESET>
    </FRAMESET>

    The script only needs to work under IE.

    Thanks.
    Alan
    I'm new to this forum but it seems very active and helpful. Thanks a lot.

  2. #2
    Join Date
    Feb 2003
    Location
    UK
    Posts
    7
    Clarification!!

    Its the
    <FRAMESET FRAMEBORDER="0" FRAMESPACING="0" COLS="50%,50%">

    that I want to change to
    <FRAMESET FRAMEBORDER="0" FRAMESPACING="0" COLS="0%,100%">

    It seems more logical to name the frameset and reference the col attribute on that, but I've never seen that coded anywhere.

    Thanks
    Alan

  3. #3
    Join Date
    Feb 2003
    Location
    UK
    Posts
    7

    Answer

    My hunch was correct, the FRAMESET needs a NAME= and then the code is simplicity:

    frames["framename"].setAttribute("cols","0%,*");

    However, it is then important to force the browser to re-draw. I open an empty page into a small browser window:

    window.open ("refresh.htm","","height=1,width=1");
    }

    The refresh.htm has an ONLOAD script to immediately close itself:

    window.close();


    Alan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles