Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-28-2009, 09:37 PM   PM User | #1
nighthawk75
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
nighthawk75 is an unknown quantity at this point
Resizing IFrame

I have an IFrame on a page which shows textual content and am trying to resize the IFrame based on the content. I have managed to acheive that but then the outer scrollbar for the page will not scroll to the bottom of the article! And also my print function will not display the content in the IFrame.

So I was trying to put the text into a div by using the following code:

sContent=document.getElementById("ArticleFrame").document.body.innerHTML;

document.getElementById("ArticleFrame").innerHTML=sContent.

The problem is that the code for sContent returns the text(code) for the parent page and not the text(code) nested in the IFrame so it ends up putting my left navigation bar into the div instead of the textual content! I have also tried using:

sContent=window.frames["ArticleFrame"].document.body.innerHTML but then sContent value is blank.

Any ideas or suggestions?
nighthawk75 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:32 PM.


Advertisement
Log in to turn off these ads.