Iframe contents
Moderators: egami, macek, gesf
----------------------------------------------------------
Hello!
I have an iframe with different contents each time. How can it fit the contents each time (flow) without a scroll bar?
Thank you,
----------------------------------------------------------
Hello!
I have an iframe with different contents each time. How can it fit the contents each time (flow) without a scroll bar?
Thank you,
----------------------------------------------------------
Don´t you want a scrollbar? Is that right !?
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
- WiZARD
- Moderator
- Posts: 1240
- Joined: Thu Jun 20, 2002 10:14 pm
- Location: Ukraine, Crimea, Simferopol
- Contact:
drimades wrote:----------------------------------------------------------
Hello!
I have an iframe with different contents each time. How can it fit the contents each time (flow) without a scroll bar?
Thank you,
----------------------------------------------------------
in IFRAME tag add scroll="auto" or scroll="on"
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";


This is what you can have on a iFrame:
So, try:In order to bring your code up to HTML 4.01 standard, write the tag names in lowercase!
Code: Select all
<IFRAME
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE | RIGHT | TEXTTOP | TOP
BORDER=integer
BORDERCOLOR=color
DATAFLD=colname
DATASRC=#ID
FRAMEBORDER=string
FRAMESPACING=string
HEIGHT=string
HSPACE=variant
CLASS=string
ID=string
LANG=string
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT
MARGINHEIGHT=string
MARGINWIDTH=string
NAME=window_name
NORESIZE=NORESIZE | RESIZE
SCROLLING=AUTO | NO | YES
SRC=string
STYLE=string
TITLE=string
VSPACE=string
WIDTH=string
event = script
></IFRAME>
Code: Select all
This:
scrolling="no"
And this:
noresize="resize"
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
----------------------------------------
<IFRAME id="boh" src="display-prop.php?action=Initial" width="90%" allowtransparency="true" scrolling="no" noresize="resize" align="center">
</IFRAME>
Still it doesn't work!
----------------------------------------
<IFRAME id="boh" src="display-prop.php?action=Initial" width="90%" allowtransparency="true" scrolling="no" noresize="resize" align="center">
</IFRAME>
Still it doesn't work!

----------------------------------------
Try this one:Don´t forget, you better write your code in lowercase!
Code: Select all
<iframe id="boh" src="display-prop.php?action=Initial" width="90%" allowtransparency scrolling="no" resize align="center"></iframe>
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
well i´m almost sure we can´t change an iframe size that way.
I think the resize/noresize properties are to specify whether we can change its size or not!
Let´s try it with javascript. Place this code between <head></head>!
Example (replace 'iframe_name' with your iframe name):Use the onload property in your body or even in your iframe tag.
Example:
Than add this property to your iframe, Like:
I think the resize/noresize properties are to specify whether we can change its size or not!
Let´s try it with javascript. Place this code between <head></head>!
Example (replace 'iframe_name' with your iframe name):
Code: Select all
<script language="JavaScript">
function resize() {
var iframe = document.all.iframe_name;
iframe.height=document.frames("iframe_name").document.body.scrollHeight;
}
</script>
Example:
Code: Select all
<body onload="resize()">
or...
<iframe onload="resize()">
Than add this property to your iframe, Like:
Code: Select all
<iframe scrolling="no" ></iframe>
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
------------------------------------
Hello!
There is a problem: if I write onload() there is a delay of 2-3 seconds until the frame resizes. Maybe it waits for the page to load and then resize ...
Do you have any idea about?
------------------------------------
Hello!
There is a problem: if I write onload() there is a delay of 2-3 seconds until the frame resizes. Maybe it waits for the page to load and then resize ...
Do you have any idea about?
------------------------------------
What do you have ?
This:or this ... ??
This:
Code: Select all
<body onload="resize()">
Code: Select all
<iframe onload="resize()">
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
And that one seems to be faster than the first!
Hunn... i don´t see how you can you put it faster than that!
Try to call that function when you link to the iframe.
Example:
Hunn... i don´t see how you can you put it faster than that!
Try to call that function when you link to the iframe.
Example:
Code: Select all
<a href="somefile.htm" target="iframe_name" onClick="resize();">link</a>
Sincerely,
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com
Gonçalo "gesf" Fontoura
gesf.org | sessionstart.com | urlms.com