棘手的IFrame问题(是的,它是关于动态高度,再次) [英] Tricky IFrame Problem (yes it's about the dynamic height, again)

查看:82
本文介绍了棘手的IFrame问题(是的,它是关于动态高度,再次)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,

我已经完成了我的研究,动态调整了iframe的高度

,但没有一个脚本具有这些功能,我所有人都需要b $ b。也许你们中的一个可以帮助我:


1. Iframe中包含的网站不在同一个域上,也不在服务器上

作为主页面


2.我不能在iframe中放任何代码(是的,我有权允许

包括iframe ;-)


3.高度需要调整,不仅仅是第一次加载主页

,而且还需要每次有人在Iframe中打开一个新网站。在这种情况下,需要重新调整

的高度。


如果脚本仅适用于IE,那么它将比没有任何东西更好(如很长

因为它适用于其他带滚动条的浏览器)如果它适用于IE

和Mozilla只有我很好。


好​​吧..我希望有人可以帮助我。我很感激。

谢谢。

来自柏林的Flo。

解决方案

f.*******@gmail.com aécrit:


3.高度不仅需要首次加载主页

加载,还需要每次有人在Iframe中打开一个新站点。在这种情况下,需要重新调整

的高度。



需要调整为* what *?


任何方式你都可以在标签中加上''onload''您的iFrame。


唯一的问题是如何获取有关来自

其他域的页面的信息。


如果脚本仅适用于IE,




$ b时,某些浏览器不接受调整其iframe的内容$ b更高的大小调整...... :-(


我认为你必须先知道给iFrame增加的高度

才能发送新的(其他)网站。

..


Hi Flo!

很抱歉,但出于安全原因,浏览器有一个限制:你

无法访问iframe的内容与来自其他域的页面(如果你

无法访问它你就不会知道iframe的内容大小。


Val Polyakh
http://trickyscripter.com


很抱歉,但出于安全考虑,浏览器有限制:你


无法访问iframe的内容与来自其他域的页面



我很确定,有一些脚本可以让iframe调整它对于一个非域名网站的内容的高度,但是这些脚本没有

还有其他所需的功能..


有没有替代Iframes可以让我达到我的目标? (并且

不,我不能通过PHP包含页面。)


谢谢大家。

Flo。

sc********@gmail.com schrieb:


Hi Flo!

很抱歉,但出于安全原因,浏览器有限制:你

不能访问iframe的内容与来自其他域的页面(如果你不能访问它,你就无法知道iframe内容的大小)。


Val Polyakh
http://trickyscripter.com

Hey Guys,
I''ve done my research for a script that dynamically adjusts the height
of the Iframe, but none of the scripts have the features, which I all
need. Maybe one of you can help me:

1. The site contained in the Iframe is no on the same Domain nor Server
as the main page

2. I can''t put any code in the Iframe (YES, I do have permission to
include the Iframe ;-)

3. The height needs to adjust not just the first time the mainpage
loads, but also everytime somebody opens a new site in the Iframe. The
height needs to be readjusted in that case, too.

If the script works for IE only, it''ll be better than nothing (as long
as it works for other browsers with scrollbars) and if it works for IE
and Mozilla only I''m good.

Alright.. I hope somebody can help me. I''d be veeeeery grateful.
Thanks.
Flo from Berlin.

解决方案

f.*******@gmail.com a écrit :

3. The height needs to adjust not just the first time the mainpage
loads, but also everytime somebody opens a new site in the Iframe. The
height needs to be readjusted in that case, too.

needs to adjust to *what* ?

any way you can have an ''onload'' in the tag of your iFrame.

The only question is how to get informations about a page coming from
other domain.

If the script works for IE only,

Some browsers don''t accept to adjust content of their iframes when
taller resized ... :-(

I think you must know previously which height to give to the iFrame
before to send it the new (other) site.
..


Hi Flo!
Sorry, but for a security reasons browsers have a restriction: you
can''t access iframe''s content with page from other domain (and if you
can''t access it you can''t know the size of the iframe''s content).

Val Polyakh
http://trickyscripter.com


Sorry, but for a security reasons browsers have a restriction: you

can''t access iframe''s content with page from other domain

I''m quite sure, that there are scripts that make an Iframe adjust it''s
height to the content of an off-domain-site but these scripts didn''t
have both of the other needed features..

Is there an alternative to Iframes that would get me to my goal? (And
no, I can''t include the page via PHP).

Thanks guys.
Flo.

sc********@gmail.com schrieb:

Hi Flo!
Sorry, but for a security reasons browsers have a restriction: you
can''t access iframe''s content with page from other domain (and if you
can''t access it you can''t know the size of the iframe''s content).

Val Polyakh
http://trickyscripter.com


这篇关于棘手的IFrame问题(是的,它是关于动态高度,再次)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆