Honesty Rocks! truth rules.

Adjusting Rows/cols Of Frames In Frameset Using Javascript Is Not Working In Firefox 3 Is Not Working

HOME      >>       Programming


I am not able to adjust frames length/width in a frameset using java script functions

I am using firefox 3.

In below code changerows is not working for me. Where as same is working in IE6.

Please help me in resolving this issue.

Note: here frameset1 is the name given to the FRAMESET.

function changeRows() { parent.frameset1.rows="30%,70%" }function restoreRows() { parent.frameset1.rows="50%,50%" }


maybe the code is different for FF 3... there must be a way to change that. (sorry I can't help ;) )


Try placing "document." between "parent." and the frameset's name:

If that doesn't work, then when you try to call the function, check out Firefox's error console.


Thanks for your reply.I tried using parent.document.ecp_cart, even thats not worked for me.As per your suggestion i checked error console of firefox and i found an interesting thing that "parent.ecp_cart is undefined".I am quite confused with this, because if i use some thing like below its working.parent.index.location ="abc.asp". Where index is one of the frame in ecp_cart frameset.If parent.ecp_cart frameset cant be identified how come its able to identify parent.index. Can you please help me to understand this behaviour.Thanks in advance.


Maybe index returns a value that can be matched to the frame's node (i'm not sure why it works), but consider using IDs as an alternate solution:

parent.document.getElementById("id").rows="%, %";