473,566 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Links take over browser window.

Is there any way to create and open a window in javascript so that links in
other websites won't "steal" it?

I've written a web page with a form for people to enter headlines and URLs
from newspapers. They will want my window to stay there as they surf through
various online newspapers. We don't want their popup links to take over my
form window!

This is a real problem - it renders my web page useless and wastes peoples
time.

It ought to be illegal for a web page to steal other web page windows!

Thanks for any help.
Jul 20 '05 #1
10 2377
"Simon Wigzell" <si**********@s haw.ca> writes:
Is there any way to create and open a window in javascript so that links in
other websites won't "steal" it?
I don't understand what you mean by "steal".

You create/open windows using window.open (unless the user is using a
popup blocker)
I've written a web page with a form for people to enter headlines and URLs
from newspapers. They will want my window to stay there
Stay where?
as they surf through various online newspapers. We don't want their
popup links to take over my form window!
What is a popup link? Is it a link that opens a popup? In that case,
they will only take over your form window if they request a popup with
the same window name as oyur window.
This is a real problem - it renders my web page useless and wastes peoples
time. It ought to be illegal for a web page to steal other web page windows!


I still don't understand what the problem is. Could you try explining
it more precisely: what windows do you have, what does the user do,
and what is the effect?

When you click on a link in a window, the page the link refers to is
opened in the same window. That is how the web normally work, and how
it is supposed to work. If the user wants to open the link in a different
window, he'll use his right click menu and chose "open in new window".

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
I don't understand the confusion! If a web page has a link that uses
javascript to pop up a web page in a new browser window, and there are other
browser windows around, the new web page will appear in one of the other
open browser windows. In this case one of the other open browser windows is
my online form webpage. I have no control or even knowledge of the webpage
that is opening other web pages in my window. So my question is, is there a
way in javascript that I can create my window such that it won't get taken
over? And it is a named window, and that makes no difference!
Jul 20 '05 #3

"Simon Wigzell" <si**********@s haw.ca> wrote in message
news:ykDQb.2604 35$ts4.203725@p d7tw3no...
I don't understand the confusion! If a web page has a link that uses
javascript to pop up a web page in a new browser window, and there are other browser windows around, the new web page will appear in one of the other
open browser windows. In this case one of the other open browser windows is my online form webpage. I have no control or even knowledge of the webpage
that is opening other web pages in my window. So my question is, is there a way in javascript that I can create my window such that it won't get taken
over? And it is a named window, and that makes no difference!


It's nothing to do with the external web page.

It is you who has opened the new window so it is you who has given the
window a name.

When you open another new window it is up to you to give that window a
different name if you don't want the existing window to be used.
Jul 20 '05 #4
"Simon Wigzell" <si**********@s haw.ca> writes:
If a web page has a link that uses javascript to pop up a web page
in a new browser window, and there are other browser windows around,
the new web page will appear in one of the other open browser
windows.
No. That *only* happens if the new window is given the *same* window
name as the existing window. The name is given as either the "target"
attribute on the link, or the second argument to "window.ope n".

So, don't reuse names, or don't use an often-used name for your window.
In this case one of the other open browser windows is my
online form webpage. I have no control or even knowledge of the
webpage that is opening other web pages in my window.
So, you must accidentally hav chosen the same window name. Change
yours. Perhaps to "_blank", which means a new page with no name,
so it will never be matched.
So my question is, is there a way in javascript that I can create my
window such that it won't get taken over?
Yes, give it a non-guessable name ("MyUltraSecret WindowNameTM") or
a non-matchable name ("_blank").
And it is a named window, and that makes no difference!


It makes *all* the difference.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5
Lee
Lasse Reichstein Nielsen said:

"Simon Wigzell" <si**********@s haw.ca> writes:
If a web page has a link that uses javascript to pop up a web page
in a new browser window, and there are other browser windows around,
the new web page will appear in one of the other open browser
windows.


No. That *only* happens if the new window is given the *same* window
name as the existing window. The name is given as either the "target"
attribute on the link, or the second argument to "window.ope n".


No, you've misunderstood what he's asking about.

He's asking about links on *other* sites opening pages in
the window in which his site is currently open.

As an example, Friday I was filling out a web form at work.
Before I finished, an important email message arrived,
containing an URL that I had to look at immediately.

I clicked on the URL, and it opened in the window that had
contained my form. Back when I was allowed to use a better
email client, I could have easily selected to open it in a
new browser instance. Instead, my options were to remember
to go BACK to what I was doing, or to open a new window so
the URL would open in it, instead of on top of my form.

Jul 20 '05 #6
Lee <RE************ **@cox.net> writes:
No, you've misunderstood what he's asking about.
Maybe :)
He's asking about links on *other* sites opening pages in
the window in which his site is currently open.
That is what I was talking about too.
As an example, Friday I was filling out a web form at work.
Before I finished, an important email message arrived,
containing an URL that I had to look at immediately.

I clicked on the URL, and it opened in the window that had
contained my form.


That is a different scenario: You are not opening the link from the
browser, but from a different application. That means that the linked
page cannot be opened in the same window as the link, because the link
is not in a browser window at all. Which window it is then opened in
depends on what the application does, and how the browser handles
requests for new pages opened by other applications.

I would not have that problem, because my browser always opens a new
requested page in a fresh window (I use Opera in MDI mode).

Your scenario doesn't match the explanation, as I read it, because it
is not another site opening the page. The word "site" makes me believe
that it is a page in a browser that contains the link. In that case
my explanation is (AFAIK) correct.

Ofcourse, it could also be because the explanation fails to describe
the problem in sufficient detail - like which browser (or even other
applications) is involved, example of pages that shows the problem,
etc.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #7
Thanks for the heated discussion! Looks like at the end there you are
finally understanding my problem! Sorry I couldn't explain it more clearly
sooner.

Actually, it occurs 100% when someone clicks on a link in an email, then it
takes over even my named window that I have popped up with javascript.

And with one person who "logs in to ZNet" and then loses my window because
ZNet steals it. I'm trying to get more info from him.

I'm asking him for more information and just telling him to "log in to ZNet"
first and then start my web page in a new browser but that seems to be
beyond him.

I'm not sure of the extent or the exact reproducible causes of this problem.
Still investigating. But for sure, under certain circumstances, even a named
window, popped up with javascript can be stolen by some other program -
email links for sure (Outlook anyway) And my clients Znet thing.

It should be illegal! There should be a way of opening a window so that
nothing else can replace it's content!

Thanks though, I'll come back when I have more info on the ZNet thing.
Jul 20 '05 #8
Im afraid to say, I use Outlook Express, and have a similar problem

Everyt8me open a link, it open's it in the same window; erasing the previous
contents

And there's no 'Open In new winsdow' iptipn option

"Richard Formby" <rf***@cueword. com.au> wrote in message
news:0D******** **********@news-server.bigpond. net.au...

"Simon Wigzell" <si**********@s haw.ca> wrote in message
news:ykDQb.2604 35$ts4.203725@p d7tw3no...
I don't understand the confusion! If a web page has a link that uses
javascript to pop up a web page in a new browser window, and there are other
browser windows around, the new web page will appear in one of the other
open browser windows. In this case one of the other open browser windows

is
my online form webpage. I have no control or even knowledge of the webpage that is opening other web pages in my window. So my question is, is there a
way in javascript that I can create my window such that it won't get

taken over? And it is a named window, and that makes no difference!


It's nothing to do with the external web page.

It is you who has opened the new window so it is you who has given the
window a name.

When you open another new window it is up to you to give that window a
different name if you don't want the existing window to be used.

Jul 20 '05 #9
On Sun, 25 Jan 2004 09:22:03 GMT, Simon Wigzell <si**********@s haw.ca>
wrote:
Thanks for the heated discussion! Looks like at the end there you are
finally understanding my problem! Sorry I couldn't explain it more
clearly sooner.

Actually, it occurs 100% when someone clicks on a link in an email, then
it takes over even my named window that I have popped up with
javascript.
While I was still using IE, this occurred frequently. IE appears to
implement a 'last window used' algorithm to decide where the content from
externally opened URLs (from Outlook, for example) will go. So, if you
were entering data into a form then went to another application that
executed something that IE should handle, the content would replace that
form. Sometimes, this didn't always happen, but it was the most consistent
behaviour I observed.

IE does have an option that determines whether associated files launched
externally would start a new process, or would open in an existing window.
In v5.5, the option is a checkbox in the advanced settings, called "Reuse
windows for launching shortcuts". It might have been renamed in v6. Opera
has a similar option (Windows > Reuse existing page), so I'd imagine that
other browsers do, too. Unfortunatly, I don't think it always worked with
IE.
It should be illegal!


That's just a little over-the-top, don't you think?

Mike

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #10

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

Similar topics

7
5846
by: bubipoo | last post by:
hi guys, i have a pic that i have created hot spots on. i want these to open popups with limited features (eg: no status, no resizable...) any ideas? darren
2
3073
by: George Hester | last post by:
I have an applet which is a cube each face if which is a link. I have a floating <DIV> element which when the mouse is over the applet it pops up showing the text of all the links in the applet. What I would like is when the mouse is over one of the faces of the cube the corresponding text in my <DIV> will highlight. So in other words this is...
14
1323
by: Simon Templar | last post by:
I have had problems several times with links to files to download. In one case I had a text file with different extension than txt, that, in case the user has the associated application installed, it could be opened with that, or otherwise downloaded. The problem was that in some clients, the browser displayed the file, wich was not the...
13
3303
by: Geoff Fox | last post by:
I am in the final moments of designing a new website. One of the pages (http://www.auditionfactory.com/samples.php) has four links to show sample work. I would like these links to open new browser windows when clicked. I have found scripts that will allow one to open, and a few that claim to all multiples to be opened, but so far nothing...
2
1613
by: BT | last post by:
I inherited a website to update and maintain and it appears that many extra files have accumulated on the server over the last few years. I would like to clean them up, but the idea of manually going thru all of the pages, listing the links and then comparing the list to the file directory seems very time consuming. Can anyone point me to...
1
3003
by: boclair | last post by:
I have been asked to assist some Veterans to overcome a problem they are having in IE6 with the behaviour of internal links on some pages they have written. Background Their schema is to float a thumbnail link to the right of a para (say), the para having the same id value as the name of full size image file that is to be downloaded. The...
1
8009
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the flash window comes above the iframe area the html links stop working. Yet the links remain active when the flash window is outside the iFrame area....
9
2669
by: mel | last post by:
Hi all, I need a persistent TCP connection with my web server over page reloads. This means that, even if the user goes to a different page (in my domain), I want to keep a TCP connection live. I know I can do something similar with globalStorage in FF, window.name & userData on IE, but those storages only hold strings.
7
5216
by: David Stone | last post by:
Run into something recently that has left me a little puzzled. According to the examples in section 13.6.1 of html 4.01... <http://www.w3.org/TR/html401/struct/objects.html#h-13.6.1.1> I should be able to use <aelements with a specified shape and coords within a <mapso that I can use the links with an actual image and, at the same time,...
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.