473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MY WAY OR THE HIGHWAY

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
Jul 20 '05 #1
8 1824
rf

"Martijn" <m_*******@hotmail.com> wrote in message
news:c9**************************@posting.google.c om...
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???????


No.

Cheers
Richard.
Jul 20 '05 #2
rf wrote:
Is this possible?
With javascript, html, asp, php or something else???????

No.

Cheers
Richard.


Thank God ;)

Jul 20 '05 #3
In article <c9**************************@posting.google.com >,
m_*******@hotmail.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?

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #4
"rf" <ma**********@the.time> wrote in message
news:MA********************@news-server.bigpond.net.au...
<snip>
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.
Jul 20 '05 #5
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <c9**************************@posting.google.com >,
m_*******@hotmail.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.
Jul 20 '05 #6

"Martijn" <m_*******@hotmail.com> wrote in message
news:c9**************************@posting.google.c om...
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


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?
Jul 20 '05 #7
In article <75**************************@posting.google.com >,
mr***********@yahoo.co.uk says...
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <c9**************************@posting.google.com >,
m_*******@hotmail.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
Jul 20 '05 #8
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <75**************************@posting.google.com >,
mr***********@yahoo.co.uk says...
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <c9**************************@posting.google.com >,
m_*******@hotmail.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.
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Martijn | last post by:
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">...
65
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++...
0
by: Mike Copeland | last post by:
In the following code I am calculating 2 values when the "Compute Distance" button is pressed. I would like to find a way to "return" both value to the form so I can show both when the calculation...
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
4
by: Hemant Shah | last post by:
Folks, I installed DB2 UBD 8.1 plus FP 5 on Redhat Fedora. I created instances without any problem, but when I try to start the instance I get SQL1092N. The instance user belongs to db2adm group...
0
by: Michael Mayer | last post by:
First of all, sorry for the cross-post. Seems like there should be a managed directx newsgroup. I'm trying to open the following sample application that comes with the DirectX SDK....
7
by: f pemberton | last post by:
I have a string (xdata) and theres a newline after every 17 characters of the string. I was wondering how I can replace multiple substrings multiple times within a string? To put it another way,...
10
by: Immortalist | last post by:
Various aquisition devices that guide learning along particular pathways towards human biases. And as E.O. Wilson might say mental development appears to be genetically constrained. (1) Language...
9
by: Hemant Shah | last post by:
How do I find out when the table was modified? When I look at syscat.tables it only lists creation time. -- Hemant Shah /"\ ASCII ribbon campaign E-mail:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.