Solved

Setting new Height and Width over iframe

Posted on 2011-03-21
7
213 Views
Last Modified: 2012-05-11
Hello,

For example, when i use an iframe, example

<iframe src="somesite">your browser doesnt support iframes</iframe>

ok, but the source (somesite) has your own width and height and how to update on the client (the page that will show the iframe content) the exact size of the source (somesite in this case)?

example,

index.html will host the iframe content
content.html is the iframe content

index.html should show in an iframe, the content.html but with it exactly size... no matter the width or height of the content, index.html will adjust it...

some idea?

Regards,
Carlos
0
Comment
Question by:cebasso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35180518
try something like this

<iframe src="somesite" style='width:100px;height:150px;'>your browser doesnt support iframes</iframe>
0
 
LVL 4

Author Comment

by:cebasso
ID: 35180579
but setting the width and height, will make my iframe 100px x 150px with scrollbars

there is a way to automatically set the "content.html" width and height without being static?

i mean, doesnt matter the width and height of the content... iframe will adjust automatically
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35180597
<<there is a way to automatically set the "content.html" width and height without being static?>>
what does this mean?
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 35180956
0
 
LVL 82

Expert Comment

by:leakim971
ID: 35180970
0
 
LVL 4

Author Comment

by:cebasso
ID: 35184095
Thank you all for help, anyway there is no working example since my iframes is cross domain...
many erros like "Permission denied"...

but i found this that really work

http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx

Works perfectly cross domain too... except in Google Chrome that keep refreshing the page forever...

the link below i'm using to test... it already contains all scripts from link above...

http://loja.tray.com.br/loja/produto.php?loja=233895&IdProd=1414

Will resize perfectly except in Chrome like i said above...

anyone know how to fix it?

Regards
0
 
LVL 4

Author Closing Comment

by:cebasso
ID: 36338673
Thank you!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question