• Post Reply Bookmark Topic Watch Topic
  • New Topic

IFRAME height difference between IE and Firefox  RSS feed

 
p malladi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a template where I have to load a cross domain URL in the center of my page and I have used IFRAME to load the URL.
The URL information which I load in my jsp page is dynamic. So I store this URL information along with the height of the IFRAME in DataBase.
Static height for this URL is stored in the database. This is to specify the height of the IFRAME.
This works fine for IE browser, however there is a problem with fire fox and safari browsers.
When the same page in opened in Fire Fox browser either there is some extra space at the end of IFRAME content or some content of the page gets truncated at the end.
The height specified for the IFRAME is not appropriate for the fire fox browser.
This problem is because in IE and Fire Fox the spacing of the content differs.

Please see the code snippet below.
<%=String height = (String) request.getAttribute("templateHeight");
String tmpURL = (String) request.getAttribute("tmpURL");
%>
<IFRAME SRC="<%=tmpURL%>" name="tmpFrame" FRAMEBORDER="1" MARGINHEIGHT="0" MARGINWIDTH="0" SCROLLING="no" width="100%" height="<%=height%>"/>
</IFRAME>


Has any body come across the above problem?
And is there a way that we can determine the height of a page in Firefox when we have the height if the page in IE browser.
Please provide me the solution.

 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I'm not sure if the styles are the same as CSS styles, but in those when you put a width you need to put in the measurement that you are using. E.g. 50%, 300px, 5em etc.
You may already be doing this but I can't tell from the code you provided.

Sean
 
p malladi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the response.

I dont have the controll over the content of the pages which I load through IFRAME.

Basically these pages reside in a different site.


Thanks,
pmalladi
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
p malladi wrote:
I dont have the controll over the content of the pages which I load through IFRAME.

Basically these pages reside in a different site.


Hey,

I didn't mean in external sites, I mean in your iframe tag where you have


what is the value of <%=height%> ???

Sean
 
p malladi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I store the height in database like height = "750".
It is just a number.
IFRAME code look like below

<IFRAME SRC="http://www.google.com/" name="tmpFrame" FRAMEBORDER="1" MARGINHEIGHT="0" MARGINWIDTH="0" SCROLLING="no" width="100%" height="750"/>
</IFRAME>

Thanks
pmalladi
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I checked it and that is valid.
Maybe someone else will have some ideas.

Sean
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!