469,612 Members | 1,650 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

break iframe script not working with banner rotator

Hello All,

I am normally great at figuring out ways around iframe issues that frustrate us all.
I am using javasript to try and break an iframe that I have a banner rotator embedded in but it is not working. I want visitors to click the banners and actually be taken to those pages instead of the new page being stuck in the iframe. What ever the case when I click on any banner, it opens the url right there inside the frame instead of breaking out ontop. Nothing I do seems to work. I even tried to alter the javascript for the ad rotator a little to look like:

<script language="javascript">
banner1 = new Banner('banner1');
banner1.add("IMAGE", "v4.png", 5, 600, 160,"url" target="_blank");
banner1.add("IMAGE", "v3.jpg", 5, 600, 160,"url" target="_blank");
banner1.add("IMAGE", "v4.png", 5, 600, 160,"url" target="_blank");
banner1.add("IMAGE", "v5.jpg", 5, 600, 160,"url" target="_blank");
banner1.add("IMAGE", "v4.png", 5, 600, 160,"url" target="_blank");

document.write(banner1);
banner1.start();
</script>

Otherwise in the <head>on the html page that the iframe is on, I am using

<script language= "JavaScript">
<!--Break out of frames
if (top.frames.length!=0)
top.location=self.document.location;
//-->
</script>

The iframe itself is:
<IFRAME NAME="uwp" SRC="url"
ALLOWTRANSPARENCY="true" frameborder="0" width="175" height="640"></iframe>

Essentially, when visitors click on banners, I want them taken to the actual site and not stuck inside the frame. Any help would be appreciated!

Kwenterprise
Apr 3 '07 #1
2 2380
JosAH
11,448 Expert 8TB
I moved this post to a more appropriate forum.

kind regards,

Jos (Java forum moderator)
Apr 3 '07 #2
acoder
16,027 Expert Mod 8TB
This should actually be in the main Javascript forum.
May 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Carolyn Gill | last post: by
3 posts views Thread by Jeff Uchtman | last post: by
2 posts views Thread by DaveO | last post: by
3 posts views Thread by Dan Johnson | last post: by
6 posts views Thread by SF RVN | last post: by
1 post views Thread by egcgt3 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.