www.webdeveloper.com
Results 1 to 6 of 6

Thread: Image Swap in iframes

  1. #1
    Join Date
    May 2004
    Posts
    9

    Image Swap in iframes

    I've noticed other post regarding this, but unfortunately nothing has helped. I think the reason why is I am working within an iframe, which is in another iframe. I think my problem is the DOM.

    I have my page basically set up, but I am having a problem getting my image swap working. Unfortunately I am not too familar with Javascript.

    I have a table with an iframe and inside that iframe i have a page that has a table with another iframe. Now inside that iframe i have pictures. I want to create a link that swaps 2 images underneath the iframe (in the table).

    Here is the link to the page: Web Page
    When you click on this link, click on the White Era link on the right side (the other links are not set up yet).

    The 2 images that I am trying to swap are tiny white boxes. I didnt want them to be seen, but wanted an image to swap to.

    I know how to swap 2 images with one link, so if you can just give me the right set up to get the swap done, I would really appreciate it. Thank you in advance.

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    It looks like your problem is to reach an object from a parent to an iframe included in another iframe.

    use this reference:

    top.frames['iframe_1_name'].frames['iframe_2_name'].document.object

  3. #3
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Here's an example attachment:
    Attached Files Attached Files

  4. #4
    Join Date
    May 2004
    Posts
    9
    thank you very much. odd enough i dont think i was having a problem with my DOM. i took your set up and was practicing with it and it was working perfectly. but when i would apply it to my page, it didnt work. i kept playing around and playing around, but the only one working was the one i was practicing with. i was about ready to pull my hair out. i had the same code in my page as my practice page. after a couple of hours of going out of my mind, i changed the html link from 1.html (my practice page) to the full link (http//:www.fht.741.com/1.html), and it didnt work anymore. so i made new pages in the top directory and instead of placing the full name, i just put the page name. now everything is working. so once again, i thank you. but why is this happening? it seems like this should not be happening. i mean its not a big deal, i just wont have that page and its contents seperated like my other pages. any clue on why that happened?

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    should work... except that you might have installed the new SP2 on your XP/IE browser which might u give some iframe related problems....

  6. #6
    Join Date
    May 2004
    Posts
    9
    i see. oh well, its all working now. now i can finish it up. thanks again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles