Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Daily iFrame Content II Script Addition

  1. #1
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Daily iFrame Content II Script Addition

    The DD Daily iFrame Content II script is awesome and works great.
    (http://www.dynamicdrive.com/dynamici...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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  3. #3
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  5. #5
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by purplehazeir; 02-01-2005 at 10:40 PM.

  6. #6
    Join Date
    May 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  7. #7
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default When iframe page is on different domain

    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

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Independently testing here, seems to require a refresh in IE6 to get the iframe resize add on to work. Not sure why.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iframe on different domains

    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

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •