MY WAY OR THE HIGHWAY

M

Martijn

Hi,

There is a website which links to my website. But they put my website
in an <IFRAME> with their logo above.

My solution:

<script language="JavaScript">
if(top.location!=self.location)top.location.replace("http://www.website.com")
</script>

This script will load page in the top location.

Now there is something else.
If somebody links to my website, and they open a new window for that.
I want to close the previous window (the window with the link)

Is this possible?
With javascript, html, asp, php or something else???????

-Martijn
 
T

Tom B

That should work, but I'm almost positive that IE will pop up a warning that
a window is trying to close another window.
 
B

Bob Barrows

Tom said:
That should work, but I'm almost positive that IE will pop up a
warning that a window is trying to close another window.
This still works, although I hear this loophole may be closed sometime in
the future:

window.opener = "me"
window.close

No warning message.

Bob Barrows
 
R

Ray at

This is an accidental "feature" that will not exist in the next version of
IE. Of course, the next version of IE will be pretty sparse at first...

Ray at work
 
B

Bob Barrows

Ray at said:
This is an accidental "feature" that will not exist in the next
version of IE. Of course, the next version of IE will be pretty
sparse at first...
Yeah, I know. It sucks (and yes, I've heard all the arguments about this
ability to close the browser window opening the door for browser hijackers
.... my reply: disable the warning in intranet or trusted zones - leave it
enabled in the internet zone.). I guess I'm going to have to convert all my
apps to HTA's ... grrr

Bob
 
R

Ray at

I don't think you'll ever get this warning if you use a webpagedialog, modal
or nonmodal. I love the webpagedialog thing, like, for my INTRAnet work
where I know that every is running IE5, 5.5, or 6...

Ray at work
 
D

David Morgan

Check for security problems... you might be better saying

if(top != self) {
top.location.href = 'xxx'
}

I am experiencing access denied when using top.location.href.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top