Reputation: 2249
I have a frameset:
<frameset rows="30px,*">
<frame id="frame1" src="frame1source.html">
<frame id="frame2" src="frame2source.html">
</frameset>
I need to be able to change the height of #frame2 from within #frame1 using jquery.
I tried many solutions to no avail, including:
$(window.parent.frames[0].document).css("height",300);
Upvotes: 2
Views: 7581
Reputation: 804
You can use below tag :
$("#fromdate, #todate").click(function () {
$('frameset', top.document).eq(2).attr('rows', '300,*');
});
Upvotes: 0
Reputation: 2249
Ok I solved this using pure JS by resizing the frameset, not just one frame.
parent.document.getElementsByTagName( 'frameset' )[ 0 ].rows="300,*";
Upvotes: 3