...

View Full Version : Need IE -> FireFox help



alpine
03-04-2005, 04:31 PM
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.



<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 -



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


and -



top.frames['MapSomedataFS'].rows = "*,170,0,0";


and get the same error.

Any ideas would be greatly appreciated

_Aerospace_Eng_
03-05-2005, 12:30 AM
try this one

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

alpine
03-07-2005, 05:04 PM
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;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum