Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: IFrame Problem

  1. #1
    101
    101 is offline
    New Coder
    Join Date
    Oct 2002
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IFrame Problem

    I have an iframe on my page:

    <IFRAME NAME="myiframe" SRC="Main.htm" WIDTH="100%" HEIGHT="95%" STYLE="border:2px solid #000000" SCROLLING="YES">
    </IFRAME>

    And i havea link:

    <TD bordercolor="black" style="cursor:hand;" onClick="parent.frames.myiframe.location.href='About Us.htm'; return false;">

    I want it so when you click the link it changes the iframe to another page.

    101

  • #2
    New Coder
    Join Date
    Feb 2003
    Location
    WV
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think the problem may be that you have your "onclick" handler in the wrong location. From what you posted, it appears that it is associated with a table division.

    If using a graphic as your link, you might want to try it as:

    <img src="my_link.gif" onClick="parent.frames.myiframe.location.href='About Us.htm'; return false;">


    and enclose that within your <td> tags

  • #3
    101
    101 is offline
    New Coder
    Join Date
    Oct 2002
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    lol i knew some one was going to say that.

    Yea i only took that part of the TD part out of my code.

    So i know that bit works becuase its all enclosed, the problem is the code.


    101
    Last edited by 101; 02-21-2003 at 07:53 PM.


  •  

    Posting Permissions

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