Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need IE -> FireFox help

    Code:
    parent.MapSomedataFS.rows = “*,170,0,0”;
    Works in IE, but won’t work in FireFox. MapSomedataFS is a name of a FRAMESET and I need to be able to dynamically resize it.

    I get the error – parent.MapSomedataFS has no properties. On the javascript console in FireFox.

    Code:
    <FRAMESET ROWS="35,*">
            <FRAME NAME="ToolFrame" SRC="blank.htm">
            <FRAMESET COLS="175,*,110">    
                <FRAMESET rows="40,*>
                    <FRAME NAME="ModeFrame" SRC="bottom.htm"
                    <FRAME NAME="TOCFrame" SRC="blank.htm">
                </FRAMESET> 
                <FRAMESET rows="*,0,0,0" ID="MapSomdataFS">    
                    <FRAME NAME="MapFrame" SRC="MapFrame.htm">
                    <FRAME NAME="TextFrame"SRC="blank.htm">   
                    <FRAME NAME="PostFrame" SRC="blank.htm">   
                    <FRAME NAME="BottomFrame" SRC="bottom.asp">
                </FRAMESET> 
                <FRAME NAME="QueryFrame" SRC="ParcelQuery.htm">
            </FRAMESET>
    </FRAMESET>
    The code - parent.MapSomdataFS.rows = "*,170,0,0"; is located in an .htm file that gets loaded in to the FRAME NAME = "TextFrame" The code runs as soon as it loads.

    I have tried both -

    Code:
    parent.document.getElementById("MapSomedataFS").setAttribute('rows','*,170,0,0',0);
    and -

    Code:
    top.frames['MapSomedataFS'].rows = "*,170,0,0";
    and get the same error.

    Any ideas would be greatly appreciated

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    try this one
    Code:
    function sizeframe(){
    parent.document.getElementById('MapSomedataFS').rows="*,170,0,0";
    }
    </script>
    then use the body onload code to call the sizeframe function, the onload should go in the same page as the one that has the script in it

  • #3
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Aerospace

    I did not try your code, but did find a solution with this function. It's in the body of the main frame and is called be the .htm that loads into a frame.


    function changeFrame(id , rows, newValues) {
    var frm = document.getElementsByTagName('FRAMESET')[id];
    if (rows) frm.rows = newValues;
    else frm.cols = newValues;
    }


  •  

    Posting Permissions

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