Forum Moderators: phranque

Message Too Old, No Replies

Linking from an iframe

to new window.

         

mack

1:16 pm on Mar 8, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



On one of my pages I use an ifame to deliver dynamic content.

I am using the following link format...
<a href="http://www.foo.com" target="_blank">link</a>

However the lnk opens within the iframe as opposed to a new window?

Any ideas. I was thiking I might have to pass a variable to a script then use a framebuster to open the link fully?

Mack.

PatomaS

10:44 am on Mar 10, 2004 (gmt 0)

10+ Year Member



Hello

:)

Well you can use this kind of links

<a href="javascript:window.open('http://www.foo.com')">link</a>

or use a funtion in your docuemt's head and just link to it

<a href="javascript:openit('first_link')">link</a>

<script type="text/javascript">
function openit(x) {
switch (x)
case 1:
ven = window.open("http://www.foo.com/","foo","width=200,height=200");
brake;
case 2:
...
brake;
}
</script>

Or you can try some variations with JavaScript

Of course if you want to open the link in the top of the current window, you can try target="_top" or target="_parent"

Good luck

Bye

sidyadav

7:00 am on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[webmasterworld.com...]

;)

Sid