Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: Page and Iframe test please

date posted 1st March 2005 12:13

Leon

Thank you very much for the pointers and script. First time I have needed
to determine the height of the IFrame so I also used some code from the net,
but if this works for you I will definitely give it a go.

Thanks
Emma
----- Original Message -----
From: "Leon Chevalier" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Tuesday, March 01, 2005 5:05 AM
Subject: RE: FN-FORUM: Page and Iframe test please


>
> Hi,
>
> I'm using IE6 on a PC and when I click one of the links the page starts to
> load in the iframe, and once it has fully loaded it produces the following
> javscript error:
>
> Line: 9
> Char: 1
> Error: Unspecified Error
> Code: 0
> URL: http://monkhousemarketing.co.uk/banners.htm
>
> I have used this technique before myself, but rather than use javascript
> links for each of the frames you can just link to the iframe in the normal
> way, with the target set as the iframe name. This will load the page in
> the
> iframe. Then, in the Iframe page itself you have this code:
>
> function resizeIframe(id) {
>
> frame = parent.document.getElementById(id);
>
> // Get the document within the frame. This is where you will fail
> with 'permission denied'
>
> // if the document within the frame is not from the same domain as
> this
> document.
>
> // Note: IE uses 'contentWindow', Opera uses 'contentDocument',
> Netscape uses either.
>
> innerDoc = (frame.contentDocument) ? frame.contentDocument :
> frame.contentWindow.document;
>
> // Resize the style object, if it exists. Otherwise, resize the frame
> itself.
>
> objToResize = (frame.style) ? frame.style : frame;
>
>
> // Resize the object to the scroll height of the inner document body.
> You may still have
>
> // to add a 'fudge' factor to get rid of the scroll bar entirely. With
> a plain-vanilla
>
> // iframe, I found Netscape needs no fudge, IE needs 4 and Opera needs
> 5...
>
> // Of course, your mileage may vary.
>
> objToResize.height = innerDoc.body.scrollHeight + 5;
>
>
> } // end function
>
> and resizeIframe('nameoftheiframe'); set to activate onload.
>
> I got this code from the net - can't remember from where - but it always
> works for me. Very simple and effective!
>
> Cheers,
>
> Leon
>
> -----Original Message-----
> From: [EMAIL REMOVED] [EMAIL REMOVED] Behalf Of Emma
> Davis
> Sent: 25 February 2005 09:20
> To: FN-FORUM / [EMAIL REMOVED]
> Subject: FN-FORUM: Page and Iframe test please
>
>
> Can anyone take a look and let me know what they get please.
>
> Cheers
> Emma
>
>
>
>
>
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>



Messages by Day
March 31st 2005
March 30th 2005
March 29th 2005
March 28th 2005
March 27th 2005
March 26th 2005
March 25th 2005
March 24th 2005
March 23rd 2005
March 22nd 2005
March 21st 2005
March 20th 2005
March 19th 2005
March 18th 2005
March 17th 2005
March 16th 2005
March 15th 2005
March 14th 2005
March 13th 2005
March 12th 2005
March 11th 2005
March 10th 2005
March 9th 2005
March 8th 2005
March 7th 2005
March 6th 2005
March 5th 2005
March 4th 2005
March 3rd 2005
March 2nd 2005
March 1st 2005


Messages by Month
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000