Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Dynamically resizing an iframe
- From: javascript@xxxxxxxxxx (Shawn Berg)
- Subject: [Javascript] Dynamically resizing an iframe
- Date: Thu, 29 Nov 2001 10:40:53 -0500
The type of file does not matter.. ASP files output the same HTML as .htm
files, the only difference being that you cannot do any server side
scripting in an HTML file. I'd read the article again and check your code to
make sure it matches up properly. The problem definitely does not have to do
with the fact that it is an ASP file.
Shawn
----- Original Message -----
From: "Herzner, Daniel" <DHerzner@xxxxxxxxxxxx>
To: <Javascript@xxxxxxxxxx>
Sent: Thursday, November 29, 2001 10:38 AM
Subject: [Javascript] Dynamically resizing an iframe
> Hi All, I'm trying to include an iframe on a web page whose source is an
> .asp file. I want the frame to be sized dynamically depending upon the
size
> of its src. The src file will always be a fixed width but the height can
> vary quite a bit. I found a technet article that made doing this sound
> pretty easy. The article only talks about doing this with an htm file as
the
> src. Am I having trouble doing this because I'm using an .asp file? The
> article includes some javascript:
>
> function reSize()
> {
> try{
> var oBody = ifrm.document.body;
> var oFrame = document.all("ifrm");
>
> oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight -
> oBody.clientHeight);
> oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth -
> oBody.clientWidth);
> }
> //An error is raised if the IFrame domain != its container's domain
> catch(e)
> {
> window.status = 'Error: ' + e.number + '; ' + e.description;
> }
> }
>
> and then the html:
>
> <BODY onload=reSize()>
> <iframe onresize=reSize() id=ifrm src=YOUR_PAGE_HERE></iframe>
> </BODY>
>
> So, I'm doing all of this but it's not making a difference to what I'm
> trying to achieve. Can someone out there please give me a hand with this?
> I've done my homework but still can't see how to pull this off. Thanx in
> advance everyone...
>
> Dan Herzner
> phn: 203-588-2294
> fax: 203-588-2460
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
- References:
- [Javascript] Dynamically resizing an iframe
- From: Herzner, Daniel
- [Javascript] Dynamically resizing an iframe
- Prev by Date: [Javascript] Dynamically resizing an iframe
- Next by Date: [Javascript] REMOVE, please
- Previous by thread: [Javascript] Dynamically resizing an iframe
- Next by thread: [Javascript] font you will desire
- Index(es):