• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

To avoid scroll bars in IFRAME

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to set the width and height of IFRAME dynamically after it has loaded. i.e. After estimating the content that it has got.
My idea is to print the html content in the browser without missing anything.
So, I should not have scroll bars for the IFRAMe. At the same time, no information should be missed out.
Can anyone help me out in this.
Thanks a lot in advance.
Dhamo.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I think that may do it.....

Eric
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think on IE you should use contentWindow, i.e.

and in NS contentDocument
 
Krishnan Dhamodharan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My scenario is I have five frames and each one may have different heights. Each ones height is also not fixed. They may vary based on certain conditions. I need to give a single print and get them all. What is happening is I am getting a print out of one page per frame individually.
I am giving window.print();
If I give print of each frame also the same thing is happening.

The height got increased. But they scroll within each other.
My requirement is like.

First Frame fully visible - Whatever may be the height of the frame based on the data.
Then only
Second Frame should start - Fully visible - irrespective of the height.
Third Frame
Fourth
Fifth.

Then by giving a single print, content in each of the frames should get printed.
Dhamo.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are leading the blind!

You run the code for each of the iframes?

Eric
 
Krishnan Dhamodharan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric Pascarello,
What I have in each IFRAME is this.
Source of each IFRAME is associated with a Servlet's output and I am getting them properly.
The problem is when I give the window.print(), I dont know why only one page of each frame is printed.
What I have in each frame is a huge business logic. It is not an easy job to replicate the code that I have.
I had also tried including each of their jsps directly and as we all know it will lead to IllegalStateException when we try to have more than one jsps.

Dhamo.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had an idea from a post in the jsp forum...

use CSS and remove the size restrictions from the iframes and see if that works:

http://www.meyerweb.com/eric/articles/webrev/200001.html
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic