...

View Full Version : IFrame Problem



101
02-21-2003, 08:28 PM
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

Code_gate
02-21-2003, 08:44 PM
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

101
02-21-2003, 08:50 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum