PDA

View Full Version : Daily iFrame Content II Script Addition



purplehazeir
01-31-2005, 10:48 PM
The DD Daily iFrame Content II script is awesome and works great.
(http://www.dynamicdrive.com/dynamicindex17/dowiframe2.htm)

I would like to use the additional optional auto size iFrame add on because it will solve a host of problems. Anyone know where this script should be added in to the exsisting script and if other switches have to be manipulated to get them both to work.

I've added them to a totally blank html page with no other script on the page in various ways - in line with the iFrame II script, added to end, etc. and the content will load but only at the width of a single line. When I comment out the add on scipt, then the iFrame content loads per the attributes I specify in:

//Specify IFRAME display attributes
var iframeprops='width=150 height=150 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"'

Any help would be appreciated.

Thanks -
Kevin

ddadmin
01-31-2005, 11:47 PM
Hi Kevin:
The Resize add-on code should work merely be being anywhere in the page's source, since it's run after the page loads. Does the page contained inside your iframe belong to the same domain as the script itself? In other words, both are on the same site? If not, a security limitation in JS means the resize code won't work.

purplehazeir
02-01-2005, 05:16 AM
Wow...what a speedy reply. Thank you!

Yes..both scripts reside in the same domain. I've tried it with the called pages in a sub folder and outside a subfolder. The iFrame Content Script II works on the call whether the page is in the sub folder or in the root.

The add on script causes the iFrame to load at 150w and about 10-15h, when it should actually be at 250 or greater in height as advertised. Both for page in a sub folder and in the root.

Could the error be created by testing merely on a local machine? I can upload to a test server to validate, but ran out of time today to try it.

ddadmin
02-01-2005, 06:01 AM
Hmmm it shouldn't matter, but try it online, and post the URL to it here if needed, and I'll try and find time to check it out.

purplehazeir
02-01-2005, 02:51 PM
The pages I was trying to load with iFrame Content II were in tables and built from a Dreamweaver template I designed. I removed the template and the tables and the content now loads with the iFrame Content II auto size add on.

I have noticed though that the iFrame content needs an F5/refresh to load the content with the auto-size add on. I've placed that portion of the script just before the </body> tag and it doesn't seem to make a difference.

Any ideas on that?

Kevin

Seanny
05-19-2005, 05:42 PM
Hi, I've got an identical problem, the iFrame wont work unless I hit refresh. I've tried the page both offline & online with no success. For the record, I removed the Google adsense script while trying to sort out the problem before I posted here. :-) The code is contained on my index page at The Nail Directory (http://www.thenaildirectory.com )

soon
06-09-2005, 11:04 AM
Hi

That script works beautifully when the page in the iframe is on your own domain. I'm in the position of wanting to offer some syndicated content to other websites, so the page in the iframe will be on a different domain (i.e. mine) than the containing page.

I realise this poses a real problem in the script finding how deep to make the iframe. BUt wonder if there is any way round it?

many thanks

Tony

jscheuer1
06-09-2005, 04:19 PM
Independently testing here, seems to require a refresh in IE6 to get the iframe resize add on to work. Not sure why.

soon
06-23-2005, 04:44 PM
Hi

Found that when the iframe is on one domain (ie someone wanting to you link your own offered syndicated content in an iframe), and the content (ie your own - so you can add a script to it)

you need a javscript in both pages. This seems to work fine:
http://www.dyn-web.com/dhtml/iframes/

best wishes

Tony

jscheuer1
06-23-2005, 05:26 PM
Could you be a little more specific? I followed the link you supplied and only found information saying access would be denied when the content was from another domain, nothing on the specifics of avoiding this problem. As this has come up many times, it would be great if there was a way around it.

hask23
08-19-2005, 08:42 AM
I think I got it to work properly, or at least it works for me on a local machine. I changed one thing, var iframeprops='width=150 height=150 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"'.

New code:
var iframeprops='scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"'

I used the code from Iframe SSI script II to fix it. I hope this works for everyone else.

redsoxfan
10-07-2005, 11:59 AM
Hello,
Was wondering if there is a solution to this refresh problem with this particular script. I know my site vistors will not want to refresh everytime. Was there a fix to this or a work around solution to this problem?
Thanks.