Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Setting new Height and Width over iframe

Posted on 2011-03-21
7
Medium Priority
?
217 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:Gurvinder Pal Singh
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:Gurvinder Pal Singh
ID: 35180597
<<there is a way to automatically set the "content.html" width and height without being static?>>
what does this mean?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

636 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