views:

188

answers:

2

I want to get the height of parent frame with jQuery.

It's my orginal script

var iframeElement = parent.document.getElementById('FrmPatient'); 
iframeElement.style.height = 170;

I want to change this script to jQuery style. How to get that?

+1  A: 

You could try this:

$("#FrmPatient", parent.document).css("height", 170);
spinon
A: 
$('FrmPatient').parent().css('height', '170px');
It doesn't work. I found two ways:one isvar theFrame = $("#FrmPatient", parent.document.body);theFrame.height(30);and the rest one is above answer of @spinon.
ppshein