Link to home
Start Free TrialLog in
Avatar of mostenscer
mostenscer

asked on

Changing Iframe Heigh (URGENT)

I have this Application and I can my web applications inside it as tools. But once the application is deployed It appears as an iframe.
Since my  was not written to run as an iframe so  but now since its deployed in another application client side pages of my application run as an Iframe.
Now since I never declared any ifram so there is no iframe id. I can refer to the parent window though.
My problem is that I want to change the height of iframe my application appears in within that large application.  how can change that since i dont have the iframe id
but i can refer to the parent window.
Its really an SOS type issue right now
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

mostenscer,

Does the iframe have a name?  Is it the only iframe?  You could try one of the options below.

parent.framename.height = '200px';

OR

parent.frames[0].height = '200px';

OR

parent.frames("framename").height = '200px';

Let me know if you have any questions or need more information.

b0lsc0tt
assuming there are no other iframes, try parent.getElementsByTagName('IFRAME')[0].setAttribute('height', 100);
Avatar of mostenscer
mostenscer

ASKER

no it doesnt have a name coz i never created my pages as frames they were adapted by the preant application as frames . so NO
and there are other frames as well.
Now what i am thinking abt  is getting the listen of iframes from the parents {i dont know how though please help} and try with each one of them? please
shun me here if i am wring  
getElementsByTagName('IFRAME') will return an array with all of the iframes
and how do iterate through that array? there are atmost 4 frames and how how do i set the height to 80% or so one by one to see which is the one i am looking for
I am sorry  but i really need to get this done and i am not javascript developer:(
SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
its not doing any thing
What is the domain of the main page and the iframe page?  Please look at my last comment which explains a security feature that would explain why it isn't working.  Let me know if you have any questions.

bol
Why the C grade (see grading guide at https://www.experts-exchange.com/help.jsp#hi73)?  Did you still have a question or need help with this?

bol