HighDots Forums  

MY WAY OR THE HIGHWAY

Javascript JavaScript language (comp.lang.javascript)


Discuss MY WAY OR THE HIGHWAY in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martijn
 
Posts: n/a

Default MY WAY OR THE HIGHWAY - 09-25-2003 , 07:41 AM






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.replac e("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

Reply With Quote
  #2  
Old   
rf
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 07:55 AM







"Martijn" <m_veerman (AT) hotmail (DOT) com> wrote

Quote:
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.replac e("http://www.website.com"
)
Quote:
/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???????
No.

Cheers
Richard.




Reply With Quote
  #3  
Old   
Daniel
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 09:49 AM



rf wrote:

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


No.

Cheers
Richard.


Thank God



Reply With Quote
  #4  
Old   
Hywel Jenkins
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 11:42 AM



In article <c9803843.0309250441.3d450dbd (AT) posting (DOT) google.com>,
m_veerman (AT) hotmail (DOT) com says...
Quote:
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)
Why? What if a visitor finds that your site is crap and they want to
return to the previous site?

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php


Reply With Quote
  #5  
Old   
Richard Cornford
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 01:00 PM



"rf" <making.it.up (AT) the (DOT) time> wrote

<snip>
Quote:
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???????

No.
Though if the new window is opened with JavaScript it may be possible to
navigate the opener to the URL of the opened window with something
like:-

if(window.opener &&
!window.opener.closed &&
window.opener.location){
window.opener.location = window.location.href;
/*and maybe:
if(window.opener.focus)window.opener.focus{};
-and/or-
if(window.close)window.close();
*/
}

(Untested)

Which might server to discourage people from using JavaScript to open
other sights in new windows. But still cannot catch people using
TARGET="_blank" and the like in their HTML.

If the site that was opening the window became aware of the script they
might try setting the opener property of the window reference returned
from window.open to null so it could not navigate it's opener.

Richard.




Reply With Quote
  #6  
Old   
madeupname
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 06:37 PM



Hywel Jenkins <hyweljenkins (AT) hotmail (DOT) com> wrote

Quote:
In article <c9803843.0309250441.3d450dbd (AT) posting (DOT) google.com>,
m_veerman (AT) hotmail (DOT) com says...
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)

Why? What if a visitor finds that your site is crap and they want to
return to the previous site?
You stupid cunt.


Reply With Quote
  #7  
Old   
Randell D.
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-25-2003 , 06:39 PM




"Martijn" <m_veerman (AT) hotmail (DOT) com> wrote

Quote:
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.replac e("http://www.website.com"
)
Quote:
/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
I've read the other posts where folk say it can't be done - I'm a newbie at
Javascript so I'm not going to go over their heads, however I've seen your
problem before...

Friends of mine had created a website for a radio station in Ireland - It so
happened that another radio station in Beiruit had the same FM or whatever
band... and the Beiruit radio station used the images from the Irish radio
station without permission (and using expensive bandwidth).

It was funny (though perhaps not very professional) but their result was to
move the real web site to another location (or changed the names of the
images - something like that). The original URL for the images of the Irish
radio station were replaced with Gadafi smoking pot and other images that,
after a short few days meant the folk hijacking someone elses hardwork and
bandwidth moved their attentions elsewhere.

So... well... perhaps that might give you some food for thought with regards
to whoever is frameing your website without your permission....

Mind you - again - I'm green around the gills when it comes to javascript
but can you not have your website perform a delayed link of a second or two,
to your home page using target=_parent or something? That would remove
their parent frame, would it not?




Reply With Quote
  #8  
Old   
Hywel Jenkins
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-26-2003 , 12:19 PM



In article <751f86d1.0309251537.6320a16d (AT) posting (DOT) google.com>,
mrrubberpants (AT) yahoo (DOT) co.uk says...
Quote:
Hywel Jenkins <hyweljenkins (AT) hotmail (DOT) com> wrote

In article <c9803843.0309250441.3d450dbd (AT) posting (DOT) google.com>,
m_veerman (AT) hotmail (DOT) com says...
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)

Why? What if a visitor finds that your site is crap and they want to
return to the previous site?

You stupid cunt.
If you are judging me by your standards you must right at the bottom of
the food chain. Millions of years of eveolution and that's the best
insult you could think of? You're a genius, and I'm sure you couldn't
have addressed the point I raised more eloquently. Now, go finish
shagging your brother.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php


Reply With Quote
  #9  
Old   
madeupname
 
Posts: n/a

Default Re: MY WAY OR THE HIGHWAY - 09-26-2003 , 08:23 PM



Hywel Jenkins <hyweljenkins (AT) hotmail (DOT) com> wrote

Quote:
In article <751f86d1.0309251537.6320a16d (AT) posting (DOT) google.com>,
mrrubberpants (AT) yahoo (DOT) co.uk says...
Hywel Jenkins <hyweljenkins (AT) hotmail (DOT) com> wrote

In article <c9803843.0309250441.3d450dbd (AT) posting (DOT) google.com>,
m_veerman (AT) hotmail (DOT) com says...
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)

Why? What if a visitor finds that your site is crap and they want to
return to the previous site?

You stupid cunt.

If you are judging me by your standards you must right at the bottom of
the food chain. Millions of years of eveolution and that's the best
insult you could think of? You're a genius, and I'm sure you couldn't
have addressed the point I raised more eloquently. Now, go finish
shagging your brother.

You stupid boring cunt.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.