473,406 Members | 2,867 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,406 software developers and data experts.

My popup window's pg co-opted by another site--help.

Any javascript I could try on this? I've got a popup window on my site
with the browser chrome removed. Another site's gone ahead and done a
popup to my same .html page. The visitor to that site doesn't realize
it unless he looks at the opener page's source code.

I'm wondering if there's a javascript solution for this? I've tried
using the window.opener.location.replace with the href being my
absolute URL, and triggered by an onUnload command in the BODY tag.
This didn't work.

What I was getting at was having my page load in place of the ripoff
site in the parent window.

In the past when when other sites tried to bring my pages into their
frames, I could various frame-buster coding. But this time, frames
aren't involved.

Are there javascript workarounds here? Any insight appreciated!
Jul 23 '05 #1
10 3309
Thad wrote:
Any javascript I could try on this? I've got a popup window on my site
with the browser chrome removed. Another site's gone ahead and done a
popup to my same .html page. The visitor to that site doesn't realize
it unless he looks at the opener page's source code.

I'm wondering if there's a javascript solution for this? I've tried
using the window.opener.location.replace with the href being my
absolute URL, and triggered by an onUnload command in the BODY tag.
This didn't work.

What I was getting at was having my page load in place of the ripoff
site in the parent window.

In the past when when other sites tried to bring my pages into their
frames, I could various frame-buster coding. But this time, frames
aren't involved.

Are there javascript workarounds here? Any insight appreciated!


document.referrer might help. It gives you the address of the page that
initiated opening the page.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
On Sat, 15 Jan 2005 19:29:48 -0800 Thad wrote:
Any javascript I could try on this? I've got a popup window on my site
with the browser chrome removed. Another site's gone ahead and done a
popup to my same .html page. The visitor to that site doesn't realize
it unless he looks at the opener page's source code. I'm wondering if there's a javascript solution for this? I've tried
using the window.opener.location.replace with the href being my
absolute URL, and triggered by an onUnload command in the BODY tag.
This didn't work. What I was getting at was having my page load in place of the ripoff
site in the parent window. In the past when when other sites tried to bring my pages into their
frames, I could various frame-buster coding. But this time, frames
aren't involved. Are there javascript workarounds here? Any insight appreciated!


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

I used this little trick on a jerk who was mirrioring my site on his.
I sent his visitors to whitehousesex.com.
What I had thought about doing, was to have 50 new windows popup any time
someone visited his site.
If you did that with those jerks, you can bet somebody will bitch and
complain about all those damn popups and get your damn site fixed.
Jul 23 '05 #3
Richard wrote:
On Sat, 15 Jan 2005 19:29:48 -0800 Thad wrote:

Any javascript I could try on this? I've got a popup window on my site
with the browser chrome removed. Another site's gone ahead and done a
popup to my same .html page. The visitor to that site doesn't realize
it unless he looks at the opener page's source code.


I'm wondering if there's a javascript solution for this? I've tried
using the window.opener.location.replace with the href being my
absolute URL, and triggered by an onUnload command in the BODY tag.
This didn't work.


What I was getting at was having my page load in place of the ripoff
site in the parent window.


In the past when when other sites tried to bring my pages into their
frames, I could various frame-buster coding. But this time, frames
aren't involved.


Are there javascript workarounds here? Any insight appreciated!

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


That does absolutely *nothing* for the OP's problem. To quote it "frames
aren't involved".

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4
Randy Webb wrote:
Richard wrote:
Thad wrote: <snip>
... . Another site's gone ahead and
done a popup to my same .html page. ... <snip>In the past when when other sites tried to bring my pages
into their frames, I could various frame-buster coding.
But this time, frames aren't involved.
<snip> if (self != top) {top.location.href = self.location.href}


That does absolutely *nothing* for the OP's problem. To
quote it "frames aren't involved".


At first impression it is difficult to see how any response to the OP
that consist of one line of such simple code could be so far of the mark
as to have no relationship to the stated problem at all. However, it
becomes less surprising when consider that this code was posted by the
infamous Richard Bullis. An individual with a seemingly well deserved
repartition for spectacular personal stupidity. For example, in response
to a question recently asked on alt.html he posted this jaw-dropping
construct:-

<quote MessageId="cs*********@news2.newsguy.com" Date="2005-01-15">

<script type="text/css>

body { onclick="#">

</script>

</quote>

It is difficult to tell which web technology this nonsense was intended
to represent. That probably isn't important, as the act of posting it
demonstrates zero understanding of HTML and CSS, let alone javascript.

It has been suggested that from a position of sufficient ignorance any
technology can resemble magic, and this may be the attitude behind many
of Richard Bullis' posts to web development groups. The line of code he
suggested is a mystical incantation that has proved effective under some
circumstances so it strikes him as reasonable to suggest that it should
be recited in response to a question that has superficial similarities.
That code posted to alt.html is an attempt to derive some sort of
incantation from other code, but unmediated by anything resembling
understanding, and ultimately a virtually random amalgam of technologies
that was doomed to futility from the outset.

Most people know enough to know when they don't understand a subject,
and react by not even attempting to give advice on that subject. Richard
Bullis seems to lack that facility. A real fool has no defence against
looking foolish.

Richard.
Jul 23 '05 #5
As the OP here, thank you Richard, for pointing out that I had said I
wasn't using frames here. The frame-buster code suggested by the other
poster wouldn't work in this situation.

For those who might someday have this problem or are curious, I did
come up with one approach that did work. Unfortunately, there's still
one hitch that I'd like to find a workaround for, if anyone knows one!

I used the following code in the header, putting in a URL to my site
where you see "*ABSOLUTE URL HERE*".

<SCRIPT language="JavaScript">
<!--
function reassert()
{
var originalLocation = window.opener.location;
window.opener.location.href = "*ABSOLUTE URL HERE*";
}
//-->
</SCRIPT>
</HEAD>

Then, I used on onUnload command in the BODY tag to trigger this.

<BODY bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" onunload="reassert();">

This did work at least with MSIE 6 and Firefox.

Meaning that when my chromeless popup page is called up by the stealing
site's page using popup code, their main page will switch to the page I
specify in the *ABSOLUTE URL HERE* code as soon as the popup closes.

I was thrilled to see this. However, this screws things up a little for
visitors on my site who view the popup. You see my popup page is
called from three different pages on my site. So this means that in two
cases, as soon as someone's viewed the popup and closes it, the page
changes on them from the one they had been viewing. Not desirable.

Without nailing down an absolute URL, the "opener" location risks being
the stealing site, from what I could tell.

I know there's gotta be a way around this. Any ideas out there?
Thad
Jul 23 '05 #6

"Thad" <th*******@yahoo.com> escreveu na mensagem
news:170120051345091849%th*******@yahoo.com...
As the OP here, thank you Richard, for pointing out that I had said I
wasn't using frames here. The frame-buster code suggested by the other
poster wouldn't work in this situation.

For those who might someday have this problem or are curious, I did
come up with one approach that did work. Unfortunately, there's still
one hitch that I'd like to find a workaround for, if anyone knows one!

I used the following code in the header, putting in a URL to my site
where you see "*ABSOLUTE URL HERE*".

<SCRIPT language="JavaScript">
<!--
function reassert()
{
var originalLocation = window.opener.location;
window.opener.location.href = "*ABSOLUTE URL HERE*";
}
//-->
</SCRIPT>
</HEAD>

Then, I used on onUnload command in the BODY tag to trigger this.

<BODY bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" onunload="reassert();">

This did work at least with MSIE 6 and Firefox.

Meaning that when my chromeless popup page is called up by the stealing
site's page using popup code, their main page will switch to the page I
specify in the *ABSOLUTE URL HERE* code as soon as the popup closes.

I was thrilled to see this. However, this screws things up a little for
visitors on my site who view the popup. You see my popup page is
called from three different pages on my site. So this means that in two
cases, as soon as someone's viewed the popup and closes it, the page
changes on them from the one they had been viewing. Not desirable.

Without nailing down an absolute URL, the "opener" location risks being
the stealing site, from what I could tell.

I know there's gotta be a way around this. Any ideas out there?
Thad


As Randy Said if you know where the stealing site is located at you could do
a little javascript with a simple redirecction to other site.
Example.
<script type="text/javascript">
function redirect()
{if (window.referrer="Agressor site")window.location="Agressor site"}
</script>
<body onload=redirect()>

but if you do not know were the site is located as it seems to be the case
you could use the same function in PHP and save it to a file so you could
know where all the visitors to you´re site came from.
Normally the most site reffered would be the agressor site
but even that could not be 100% true.

Hope that helped.
Jul 23 '05 #7
"Oscar Monteiro" <of**@hotmail.com> wrote in message
news:42***********************@news.telepac.pt...

"Thad" <th*******@yahoo.com> escreveu na mensagem
news:170120051345091849%th*******@yahoo.com...
As the OP here, thank you Richard, for pointing out that I had said I
wasn't using frames here. The frame-buster code suggested by the other
poster wouldn't work in this situation.

For those who might someday have this problem or are curious, I did
come up with one approach that did work. Unfortunately, there's still
one hitch that I'd like to find a workaround for, if anyone knows one!

I used the following code in the header, putting in a URL to my site
where you see "*ABSOLUTE URL HERE*".

<SCRIPT language="JavaScript">
<!--
function reassert()
{
var originalLocation = window.opener.location;
window.opener.location.href = "*ABSOLUTE URL HERE*";
}
//-->
</SCRIPT>
</HEAD>

Then, I used on onUnload command in the BODY tag to trigger this.

<BODY bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" onunload="reassert();">

This did work at least with MSIE 6 and Firefox.

Meaning that when my chromeless popup page is called up by the stealing
site's page using popup code, their main page will switch to the page I
specify in the *ABSOLUTE URL HERE* code as soon as the popup closes.

I was thrilled to see this. However, this screws things up a little for
visitors on my site who view the popup. You see my popup page is
called from three different pages on my site. So this means that in two
cases, as soon as someone's viewed the popup and closes it, the page
changes on them from the one they had been viewing. Not desirable.

Without nailing down an absolute URL, the "opener" location risks being
the stealing site, from what I could tell.

I know there's gotta be a way around this. Any ideas out there?
Thad
As Randy Said if you know where the stealing site is located at you could

do a little javascript with a simple redirecction to other site.
Example.
<script type="text/javascript">
function redirect()
{if (window.referrer="Agressor site")window.location="Agressor site"}
</script>
<body onload=redirect()>

but if you do not know were the site is located as it seems to be the case you could use the same function in PHP and save it to a file so you could
know where all the visitors to you´re site came from.
Normally the most site reffered would be the agressor site
but even that could not be 100% true.

Hope that helped.


"window.referrer" ?

This doesn't work for me:

<script type="text/javascript">
alert(window.referrer);
</script>
Jul 23 '05 #8
McKirahan wrote:

(snip)
"window.referrer" ?

This doesn't work for me:

<script type="text/javascript">
alert(window.referrer);
</script>
That's because you forgot to create it first:
Oscar Monteiro wrote:
{if (window.referrer="Agressor site")..... ;-)


Jul 23 '05 #9
> > I used the following code in the header, putting in a URL to my site
where you see "*ABSOLUTE URL HERE*".

<SCRIPT language="JavaScript">
<!--
function reassert()
{
var originalLocation = window.opener.location; // ADD THIS CODE
var actualLocation = originalLocation.href;
if (actualLocation.search(^/http:\/\/www.mydomain.com/) == -1)
{ window.opener.location.href = "*ABSOLUTE URL HERE*"; // AND THIS CODE IF DESIRED
} else {
// I am on my site so I don't need to mess with the URL
} }
//-->
</SCRIPT>
</HEAD>

Then, I used on onUnload command in the BODY tag to trigger this.

<BODY bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" onunload="reassert();">

This seems to work for me to hijack the hijacker without disrupting
normal site flow.
Jul 23 '05 #10

"McKirahan" <Ne**@McKirahan.com> escreveu na mensagem
news:vP********************@comcast.com...
"Oscar Monteiro" <of**@hotmail.com> wrote in message
news:42***********************@news.telepac.pt...

"Thad" <th*******@yahoo.com> escreveu na mensagem
news:170120051345091849%th*******@yahoo.com...
> As the OP here, thank you Richard, for pointing out that I had said I
> wasn't using frames here. The frame-buster code suggested by the other
> poster wouldn't work in this situation.
>
> For those who might someday have this problem or are curious, I did
> come up with one approach that did work. Unfortunately, there's still
> one hitch that I'd like to find a workaround for, if anyone knows one!
>
> I used the following code in the header, putting in a URL to my site
> where you see "*ABSOLUTE URL HERE*".
>
> <SCRIPT language="JavaScript">
> <!--
> function reassert()
> {
> var originalLocation = window.opener.location;
> window.opener.location.href = "*ABSOLUTE URL HERE*";
> }
> //-->
> </SCRIPT>
> </HEAD>
>
> Then, I used on onUnload command in the BODY tag to trigger this.
>
> <BODY bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0"
> marginwidth="0" marginheight="0" onunload="reassert();">
>
> This did work at least with MSIE 6 and Firefox.
>
> Meaning that when my chromeless popup page is called up by the stealing
> site's page using popup code, their main page will switch to the page I
> specify in the *ABSOLUTE URL HERE* code as soon as the popup closes.
>
> I was thrilled to see this. However, this screws things up a little for
> visitors on my site who view the popup. You see my popup page is
> called from three different pages on my site. So this means that in two
> cases, as soon as someone's viewed the popup and closes it, the page
> changes on them from the one they had been viewing. Not desirable.
>
> Without nailing down an absolute URL, the "opener" location risks being
> the stealing site, from what I could tell.
>
> I know there's gotta be a way around this. Any ideas out there?
>
>
> Thad


As Randy Said if you know where the stealing site is located at you could

do
a little javascript with a simple redirecction to other site.
Example.
<script type="text/javascript">
function redirect()
{if (window.referrer="Agressor site")window.location="Agressor site"}
</script>
<body onload=redirect()>

but if you do not know were the site is located as it seems to be the

case
you could use the same function in PHP and save it to a file so you
could
know where all the visitors to you´re site came from.
Normally the most site reffered would be the agressor site
but even that could not be 100% true.

Hope that helped.


"window.referrer" ?

This doesn't work for me:

<script type="text/javascript">
alert(window.referrer);
</script>

yes , true. the function is not window referrer but document.referrer as it
referrers to a previous document. my mistake sorry.

Jul 23 '05 #11

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

Similar topics

1
by: CG | last post by:
Hi, I have an ASP application. On one of my pages I have a link to a popup. This popup has a link. When the user clicks this link my popup closes and another Popup is displayed. In this...
5
by: Willem van Isselmuden | last post by:
Hello, I've a problem I hava a page with different popup windows, when I hit a link the first one pops up and with the first open i would like to hit the second link in the parent page so the...
2
by: Kevin Lam | last post by:
Hi all, I am writing an application which requires using a popup windows to edit the detail of a record. The popup windows is created by it's parent which shows the detail of the record,...
6
by: nizar.jouini | last post by:
I have web page that contains two links. link "a" and link "b". When I click on "a" a small window should pop up. when I click on "b" another small window should pop up. So what you should see now...
9
by: ALPO | last post by:
Any good advice or examples of popup data entry windows for ASP.NET?
3
by: clsmith66 | last post by:
I am building an ASP.NET application where I have been required to make all the editing screens popup windows within the application. I didn't have any trouble creating the new windows but only...
1
by: Chris Leffer | last post by:
Hi. I wrote a small routine that opens popup windows. The code works well, but I did a small change to center the popup window and this change does not work. I can't understand why. That's the...
1
by: Jennyfer J Barco | last post by:
Hello I have a datagrid and a linkbuttom in the datagrid that says Picture, every time I click on the link "Picture" my program opens a popup window showing a picture of the item the selected and...
4
by: Ed Jay | last post by:
I'm using the following simple js to open a popup window. var popwin; function launchwin(winurl,winname,winfeatures) { popwin = window.open(winurl,winname,winfeatures); } Using the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.