473,396 Members | 1,891 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,396 software developers and data experts.

How to open a new window in Firefox and keep the reference?

Hi!

For an in-house web application (it will only be deployed on Firefox
browsers with JavaScript turned on), I need to open a preview window
(which needs to be a separate window, even if Firefox is set to open
targeted links in new tabs) and be able to change the preview window's
location.href from the opening window, even after a new page is loaded
into that window.

Is there any way to do that?

Thanks a lot,

Simon

Sep 3 '07 #1
4 9801
de****@gmail.com wrote:
Hi!

For an in-house web application (it will only be deployed on Firefox
browsers with JavaScript turned on), I need to open a preview window
(which needs to be a separate window, even if Firefox is set to open
targeted links in new tabs) and be able to change the preview window's
location.href from the opening window, even after a new page is loaded
into that window.

Is there any way to do that?

Thanks a lot,

Simon
Hi Simon.

window.open() returns a reference.
You can use that reference to find the window and change its location
property.

Regards,
Erwin Moller
Sep 3 '07 #2
Hi!

On 3 Sep., 16:45, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
window.open() returns a reference.
You can use that reference to find the window and change its location
property.
Yeah, thanks, but this solution doesn't address two of my problems:
Since most people have set their browser to open new windows in a new
tab instead, this doesn't make a new window. And the reference
returned is lost as soon as the user clicks on a link in the original
window, causing it to load a new page.

All the pages I found when researching show the window.open method and
the target="whatever" method, are those two the only ways to open a
new window?

Simon

Sep 3 '07 #3
de****@gmail.com wrote:
For an in-house web application (it will only be deployed on Firefox
browsers with JavaScript turned on), I need to open a preview window
(which needs to be a separate window, even if Firefox is set to open
targeted links in new tabs) and be able to change the preview window's
location.href from the opening window, even after a new page is loaded
into that window.

Is there any way to do that?
It should be possible if you write a Firefox extension and your users
install that I think. I don't think you have a chance with unprivileged
script simply loaded from your web server.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 3 '07 #4
ASM
En réponse à de****@gmail.com qui écrivit, en date du : 3/09/07 16:30,
le message suivant :
Hi!

For an in-house web application (it will only be deployed on Firefox
browsers with JavaScript turned on), I need to open a preview window
(which needs to be a separate window, even if Firefox is set to open
targeted links in new tabs)
In that case, with window.open() , my Firefox always open a popup.
and be able to change the preview window's
location.href from the opening window, even after a new page is loaded
into that window.

Is there any way to do that?
<script type="text/javascript">
function pop(myFile) {
// opening popup after a small time (if not yet opened)
setTimeout( function() {
if(typeof(truc)=='undefined' || truc.closed)
truc = window.open('','myTarget','width=300,height=300');
// to regulary set back to main (mother) window the reference of popup
truc.onload = function() {
setInterval(function() { opener.truc = self; }, 200);
}
truc.location = myFile;
truc.focus();
},
200);
return false;
}
</script>

Tested in Fx 2.0.0.6
Sep 3 '07 #5

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

Similar topics

1
by: Ben Smeets | last post by:
Hi folks, Have been trying to figure out a solution for the following problem by reading lots of threads here, but doesn't work out. Hope someone can help me. I have a parent window which...
13
by: Dave Holmes | last post by:
Is there a way to keep an other application from opening a link in a browser where I am running an ASP application? For example, I have an ASP application open in a browser. If I click on a link...
2
by: Larry R Harrison Jr | last post by:
I have pull-down menus in javascript and I have the code for opening a link in a new window. But I want it to open a full-sized window. I can't figure out the syntax. What I have so far: ...
8
by: Dominic Tocci | last post by:
I'm searching for a way to use window.open on my web page to open a window in firefox that allows the sidebars to work (bookmarks, history, etc). When I use the following: var...
29
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the...
4
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park...
13
by: tochiromifune | last post by:
Hello The window.open method brings my window to the top only if it is new. If it's being reused, the window does not come to the foreground (with IE 6 it does). Is there a new way in...
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
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,...

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.