Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

To avoid scroll bars in IFRAME

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator


I think that may do it.....

Eric
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic