Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2007, 12:16 AM
Authorized User
 
Join Date: Aug 2005
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Default adjust ifram size according 2 content

gud morning!

i've placed an iframe on my page whose content is changed dynamically, I dont want n.e scrollbar on iframe, the thing what I want iz everytime the content of iframe changes, the size of iframe should also change, so that there should not be n.e scrollbar on iframe

i'll w8 4 a gud reply

bye

 
Old August 23rd, 2007, 12:35 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You can't do this strictly in HTML and even using a server language like ASP.NET, you are not guranteed to get the desired effect.

Here is the reason why: Say that you employ ASP.NET and you dynamically alter the height of your iframe control based upon the values being loaded into the iframe (This, in and of itself would be a bit complex since you would have to capture all the HTTP requests) and you assume a font size of 12px. So you go and do some computations of how many lines of text are in the file and equate that to the size the iframe should be and it works, as long as the user hasnt messed with their browser!

What I mean is, if the user has held down their ctrl key and rolled their scroll wheel on their mouse, the text on the page will get significantly larger (or smaller) and will cause your iframe to produce scroll bars.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I adjust this SQL query? ajtruckle SQL Language 10 October 6th, 2007 01:54 PM
adjust zone time kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 6 July 2nd, 2007 08:53 AM
pls help how can I use php to adjust my webpage [email protected] Beginning PHP 0 August 10th, 2006 02:35 PM
function adjust-dateTime-to-timezone Tomi XSLT 3 July 26th, 2006 11:51 AM
Adjust Pie Chart Size terencechua Reporting Services 0 January 19th, 2006 10:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.