SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refreshing an iframe inside an iframe

    In a webpage of mine that I'm making I have an iframe inside an iframe.
    The first iframe is called "contentFrame" and the second iframe is called "tag".
    I wish to refresh the "tag" frame every 30 seconds or so.
    The "tag" frames content is external to my website so I can't just add a meta tag to refresh it.
    I've tried adding:
    Code:
    function refreshTag() {
      parent.tag.location.reload();
      setTimeout("refreshTag();",30000);
    }
    to the "contentFrame" <head> with an "onLoad" call in its <body> but it comes up with the error that "parent.tag.location" is null or not an object...
    if a link will help (link)

    any help is much appreciated.
    Last edited by Lunchy_Munchy; Jan 18, 2003 at 13:11.

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    mmmm....

    I haven't used frames for a while but isn't the parent to the contentframe the page? (the one that created it) I think you need child or something
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  3. #3
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    IFrame compatibility?

    Like the use of your frames...
    Is the iFrame cross-browser comptatible (for ALL browsers)?
    I'm trying to set up a mirror site with no javascript that works in all browsers.

    Hope someone can let me know
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i would image that they are cross-browser comptatible cuz you see them around so much.
    as for the child thing, i don't really know how to use child so if it is the right way to go about it could ne 1 tell me how!!

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just tried using

    Code:
    parent.frames.contentFrame.frames.tag.location.reload();
    taken from http://www.tek-tips.com/gfaqs.cfm/le...id/216/fid/931

    but i get an error saying permission denied .... i don't understand

  6. #6
    SitePoint Enthusiast Incubator's Avatar
    Join Date
    Apr 2002
    Location
    Good old Belgium
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use this
    Code:
    window.frames['framename or index'].src="enter the same url here";
    i dont really know how to use the parent object either, but the window object should do it
    "Press any key to continue. Press any other key to exit."

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ack, same error
    permission denied :/
    thanks for the suggestion though.

    could the problem be that its refering to an iframe inside an iframe?


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
  •