SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict -Ice-php's Avatar
    Join Date
    May 2002
    Location
    UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IFrame Parent Document Image Change

    Hey
    I have my main document which has a header image which is changed by javascript. But when i click a link in the IFrame location in the main document I want to be able to change the image on the main document. How can i do this. I am trying to do it through the <a> html tag using onClick function.
    menu.src='image.gif'
    is the format which I am using
    does this make sense?
    Thanks for your help
    -Ice

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds good to me.
    Code:
    <a href="#" onclick="parent.document.getElementById('menu').src='image.gif';return false;">whatever</a>
    Code:
    <img id="menu" src="....... />
    ::: certified wild guess :::

  3. #3
    SitePoint Addict -Ice-php's Avatar
    Join Date
    May 2002
    Location
    UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much for help! It worked perfectly !!
    -Ice


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
  •