SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link on Iframe should change div on page

    I have a page where I load an iframe and in that iframe, i have an onclick that looks like this

    onclick="javascript:ajaxpage('http://localhost/project/includes/php/add-images.php?src=" . $oname . "&dsc=" . $dsc . "', 'add-images');"

    The problem is that the "add-images"-DIV is not in the iframe, it's on the page that loads the iframe, are there any way to make this work, or do I have to find another way of doing it?

    Thanks in advance!

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not completely sure but!

    parent.getElementById('add-images')

    or if that doesn't work try

    parent.document.getElementById('add-images')


  3. #3
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually have a look at :

    http://www.quirksmode.org/js/iframe.html



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
  •