/    Sign up×
Community /Pin to ProfileBookmark

Iframe Help!!!! PLEASE!

Ok this is what I need…Lets say I have a page with an iframe on it. And I click a link that loads in the iframe, but the page that is loading in the iframe is bigger then the iframe so it will obviously have scrollbars in it. I’m trying to find a script that will stretch the iframe to the exact size of the page that is being loaded in it, so there is no need for any iframe scrollbars… if your wondering if I should do scrolling=”0″, That won’t work because the whole page is still not visible in the iframe know what I mean?

If anyone has a solution or a Script I’m seriously begging you for it!!! Thanks in Advance!

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@ShrineDesignsDec 13.2002 — this will work for ya

you must set the height and width to what you need it to be.

the [b]scrolling[/b] attribute can only be set to "auto"; "yes"; or "no".

<html>

<head>

<title></title>

<script language="JavaScript" type="text/JavaScript">

<!--

function resize(obj,w,h){

if (document.getElementById || document.all) {

SD = document.getElementById(obj).style || document.all[obj].style;

}

SD.width = w;

SD.height = h;

}

//-->

</script>

</head>

<body>

<a href="http://www.#.com" target="myFrame" onClick="resize('myFrame',400,400)">link</a><br>

<iframe src="none" frameborder="1" scrolling="no" name="myFrame" id="myFrame"></iframe>

</body>

</html>
Copy linkTweet thisAlerts:
@XstemauthorDec 13.2002 — Thanks, The script does work, but instead of putting in the exact page height/width for every page, is there anyway to edit the script to make it recognize the size of the page that is being loaded in it automatically?? Thank again!
Copy linkTweet thisAlerts:
@ShrineDesignsDec 14.2002 — i don't think it is possible; who knows maybe sombody can figure it out
Copy linkTweet thisAlerts:
@DUMD-DODec 24.2002 — What???

Load a page in the iframe

Option 1 -- make your Iframe bigger

Option 2 -- load the page in a new window

or just put up with a scorll bar that allows the user to see the whole page

OH.. Scrolling is YES and NO only
Copy linkTweet thisAlerts:
@DUMD-DODec 24.2002 — What???

Load a page in the iframe

Option 1 -- make your Iframe bigger

Option 2 -- load the page in a new window

or just put up with a scorll bar that allows the user to see the whole page

OH.. Scrolling is YES and NO only
Copy linkTweet thisAlerts:
@XstemauthorDec 26.2002 — Take a look at www.xstem.com, and see why I needed that script. If you can figure it out good, if you can't too bad I'm not going to explain it.
Copy linkTweet thisAlerts:
@King_PellinoreDec 27.2002 — The technique of split and DESTROY! I mean CONQUER!

First, determine if you can find the width of the window from inside the window. Like, if you have a table (with everything else inside) with a fixed width, use JavaScript to find out its width and height.

Then, from the page you load, you can control the iframe size by sayingtop.iframename.width=thewidth;and similar for the height. [FONT=courier new]top[/font] here means the top element, as you might have guessed.

Try this.
×

Success!

Help @Xstem spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...