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

window.open problem in firefox

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
popWindow=window.open('http://www.yahoo.com','','width=600,height=400,toolbar=1, location=1,menubar=1,resizable=1,titlebar=1,direct ories=1,status=1,scrollbars=1');
the sidebars are disabled. I click on the buttons for bookmarks and history
and they do nothing. I checked the DOM and it says "chromehidden =
extrachrome".

I want no chrome hidden at all. Is there any way to accomplish this with a
window.open in firefox? (target="_blank" will not work for me).

Thank you,
Dominic
Jul 23 '05 #1
8 5601
Dominic Tocci wrote :
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
popWindow=window.open('http://www.yahoo.com','','width=600,height=400,toolbar=1, location=1,menubar=1,resizable=1,titlebar=1,direct ories=1,status=1,scrollbars=1');
the sidebars are disabled.
Try

var popWindow = window.open("http://www.yahoo.com", "RequestedPopupWindow");

and the sidebar functionality should be there. I just tried it with Deer
Park alpha 1 rv 1.8b2 build 20050703 and it worked.

http://developer-test.mozilla.org/en/docs/window.open

I click on the buttons for bookmarks and history and they do nothing. I checked the DOM and it says "chromehidden =
extrachrome".

For what kind of application or webpage requirements or context do you
want the secondary window to have sidebar capabilities?
I want no chrome hidden at all. Is there any way to accomplish this with a
window.open in firefox? (target="_blank" will not work for me).
By not defining the strTarget parameter, you are in fact requesting an
unnamed secondary window, just like you would with target="_blank".

Thank you,
Dominic


http://developer-test.mozilla.org/en/docs/window.open

I would make the WindowObjectReference a global variable.

Gérard
--
remove blah to email me
Jul 23 '05 #2
ASM
Dominic Tocci wrote:
the sidebars are disabled.


I think to do what you want : a blank basic window
best way is :

popWindow=window.open('http://www.yahoo.com')


--
Stephane Moriaux et son [moins] vieux Mac
Jul 23 '05 #3
ASM
Gérard Talbot wrote:

By not defining the strTarget parameter, you are in fact requesting an
unnamed secondary window, just like you would with target="_blank".
hu ?
I use to do not give a target name in my window.open callings
if I don't need it for html code (<a target="something" )

accessing to the pop-p window by its JS name, example :

foo = window.open('page.htm','','width=300,height=200');
foo.blur();
with(foo.document) { open();write('hello');close();}
foo.moveTo(150,90);
foo.focus();
// and so on
http://developer-test.mozilla.org/en/docs/window.open

I would make the WindowObjectReference a global variable.


Don't understand your question

function pop(page) {
WindowObjectReference = window.open(page,'','resizable=1');
}

on pop(page) 1st call, WindowObjectReference becomes global

to avoid that you need :

function pop(page) {
var WindowObjectReference = window.open(page,'','resizable=1');
}

wich is of not real interest ...
(no more calling to the pop up window)

--
Stephane Moriaux et son [moins] vieux Mac
Jul 23 '05 #4
My dilemma is caused by tabbed browsing and "tabbrowser preferences". I
have a chromeless window, from which I want to spawn fully functional pop-up
windows. Basically, I want to replicate the same behavior as
<a href="http://www.yahoo.com" target="_blank">click here</a>
but I always want the page in a new window, not a new tab. When something
opens in a new tab in a window without any chrome it becomes unaccessible.
Tabbrowser preferences forces the html code above to open in a new tab. The
only way I have found to override the tab functionality is by window.open
and the code I included. I can force all parts of the chrome to appear
except for the illusive "extraChrome" stuff, which apparently includes the
sidebar. (The code works in IE, but not in firefox.)

For some reason, your proposed solution does not override the common plugin
"tabbrowser preferences" at all. In your example, the new window simply
opens in a new tab for me, so I'm back to it being inaccessible. Thanks for
the suggestion though.
"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:3i************@uni-berlin.de...
Dominic Tocci wrote :
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
popWindow=window.open('http://www.yahoo.com','','width=600,height=400,toolbar=1, location=1,menubar=1,resizable=1,titlebar=1,direct ories=1,status=1,scrollbars=1');
the sidebars are disabled.
Try

var popWindow = window.open("http://www.yahoo.com", "RequestedPopupWindow");

and the sidebar functionality should be there. I just tried it with Deer
Park alpha 1 rv 1.8b2 build 20050703 and it worked.

http://developer-test.mozilla.org/en/docs/window.open

I click on the buttons for bookmarks and history and they do nothing. I checked the DOM and it says "chromehidden =
extrachrome".

For what kind of application or webpage requirements or context do you
want the secondary window to have sidebar capabilities?
I want no chrome hidden at all. Is there any way to accomplish this with
a window.open in firefox? (target="_blank" will not work for me).
By not defining the strTarget parameter, you are in fact requesting an
unnamed secondary window, just like you would with target="_blank".

Thank you,
Dominic

http://developer-test.mozilla.org/en/docs/window.open

I would make the WindowObjectReference a global variable.

Gérard
--
remove blah to email me
Jul 23 '05 #5
ASM wrote :
Gérard Talbot wrote:

By not defining the strTarget parameter, you are in fact requesting an
unnamed secondary window, just like you would with target="_blank".

hu ?
I use to do not give a target name in my window.open callings
if I don't need it for html code (<a target="something" )

accessing to the pop-p window by its JS name, example

window.open("http://browsehappy.com/", "", "resizable");
will create an unnamed secondary window, just like if you had done

<a href="http://browsehappy.com/" target="_blank">Upgrade your browser</a>

Giving a name to a secondary window has nothing to do with accessing the
secondary window. You're confusing, and this happens often, the string
name of a secondary window and its object reference.
What you refer to as "JS name" is in fact the object reference: that has
nothing to do with the string name of the window.
:
foo = window.open('page.htm','','width=300,height=200');
foo.blur();
with(foo.document) { open();write('hello');close();}
foo.moveTo(150,90);
foo.focus();
// and so on
The use of blur, moveTo and focus are certainly suspicious here. You're
using these for no reasons.
Second, you can not script a document without first making sure it is
loaded. Window and document are loaded asynchronously; the load event of
a window is distinct, separate from the load event of the document. The
window object could exist while the document object might sitll not be
scriptable.
http://developer-test.mozilla.org/en/docs/window.open

I would make the WindowObjectReference a global variable.

Don't understand your question


There is no question: just a statement.
function pop(page) {
WindowObjectReference = window.open(page,'','resizable=1');
}

on pop(page) 1st call, WindowObjectReference becomes global

Variable scope should be explicit for various reasons: code maintenance,
avoiding side effects, etc. That's why there is the keyword var.

to avoid that you need :

function pop(page) {
var WindowObjectReference = window.open(page,'','resizable=1');
}


Here, it is local and such reference won't exist outside the scope of
the function.

Gérard
--
remove blah to email me
Jul 23 '05 #6
Dominic Tocci wrote :
My dilemma is caused by tabbed browsing and "tabbrowser preferences". I
have a chromeless window, from which I want to spawn fully functional pop-up
windows. Basically, I want to replicate the same behavior as
<a href="http://www.yahoo.com" target="_blank">click here</a>
but I always want the page in a new window, not a new tab.
You can not force that. Already K-meleon 0.9, Mozilla 1.8b2, Firefox
Deer Park alpha 1 give (possibly) 100% control over these issues to the
users.

When something opens in a new tab in a window without any chrome it becomes unaccessible.
Tabbrowser preferences forces the html code above to open in a new tab.

That's one reason among many others why coding of links should be
careful: nothing (at least regarding requested popups and use of
window.open) can be forced anymore and one has to evaluate accessiblity
of links. This trend won't change. You can expect MSIE 7 to implement
tab-browsing (that is already not a rumor but a solid fact).
The only way I have found to override the tab functionality is by window.open
and the code I included.
Nope. Not true. Mozilla 1.8b2, Firefox Deer Park alpha 1 already offers
users ways to go around (almost) any window.open calls. Same thing with
k-meleon 0.9 and possibly other tab-capable browsers.

I can force all parts of the chrome to appear except for the illusive "extraChrome" stuff, which apparently includes the
sidebar. (The code works in IE, but not in firefox.)

For some reason, your proposed solution does not override the common plugin
"tabbrowser preferences" at all.
No and my proposed solution should not override or overcome the user
settings, prefs, advanced features. My proposed solution should
sidestep/move out of the way of the users' prefs, advanced settings, etc..
On my own website, I do not try to work against the users' freedom,
preferences or try to work despite/regardless of the users' prefs,
advanced settings; I try to work in accordance to his freedome,
preferences, advanced settings. So every link that opens a new window is
clearly, explicitly identified so that the user can override such
opening mode and have/impose his own preferred mode of opening link
whatever it might be:
- in a new secondary window
- in a new tab in the same window
- in the same tab of the same window
- in the background
- not in the background (with focus transferred)

In your example, the new window simply opens in a new tab for me, so I'm back to it being inaccessible.


It's the other way actually. If you were to create a new window by
force, your code would be considered as anti-accessible because it
removes flexibility from the user, it would go against the will of
users, against their prefs, their settings.

Gérard
--
remove blah to email me
Jul 23 '05 #7
You've jumped to conclusions. I left out the unnecessary moral details for
the sake of brevity. I did not anticipate being judged.

I offer my users the flexibility to have a special page appear in a
chromeless window. I later present them with a table of rows which
highlight onmouseover. If the user clicks any part of a row (necessitating a
method calling a javascript function), they wish to open an external link.
I have two javascript choices, window.open or document.location.href, and I
must make this choice for the user. The choice is easy considering there is
no chrome in the current window. (Think about it. No tabs. No back button.
External site not designed for that.) I am attempting to restore all chrome
functionality to their new browser window for maximum flexibility. This
works in IE and almost works in Firefox. However, in Firefox the user is
left with no access to any sidebar. The associated menu buttons do nothing.
There is an unfortuate default "extraChrome=hidden" in the DOM for the new
window. I'm trying to avoid that unpleasant experience for the user.

And if the power-users who control window.open can get themselves stuck,
it's their own fault and they can find their way out of it. I'm designing
for the lowest common denominator.

Any solution would be appreciated.
"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:3j************@uni-berlin.de...
Dominic Tocci wrote :
My dilemma is caused by tabbed browsing and "tabbrowser preferences". I
have a chromeless window, from which I want to spawn fully functional
pop-up windows. Basically, I want to replicate the same behavior as
<a href="http://www.yahoo.com" target="_blank">click here</a>
but I always want the page in a new window, not a new tab.


You can not force that. Already K-meleon 0.9, Mozilla 1.8b2, Firefox Deer
Park alpha 1 give (possibly) 100% control over these issues to the users.

When something
opens in a new tab in a window without any chrome it becomes
unaccessible. Tabbrowser preferences forces the html code above to open
in a new tab.

That's one reason among many others why coding of links should be careful:
nothing (at least regarding requested popups and use of window.open) can
be forced anymore and one has to evaluate accessiblity of links. This
trend won't change. You can expect MSIE 7 to implement tab-browsing (that
is already not a rumor but a solid fact).
The
only way I have found to override the tab functionality is by window.open
and the code I included.


Nope. Not true. Mozilla 1.8b2, Firefox Deer Park alpha 1 already offers
users ways to go around (almost) any window.open calls. Same thing with
k-meleon 0.9 and possibly other tab-capable browsers.

I can force all parts of the chrome to appear
except for the illusive "extraChrome" stuff, which apparently includes
the sidebar. (The code works in IE, but not in firefox.)

For some reason, your proposed solution does not override the common
plugin "tabbrowser preferences" at all.


No and my proposed solution should not override or overcome the user
settings, prefs, advanced features. My proposed solution should
sidestep/move out of the way of the users' prefs, advanced settings, etc..
On my own website, I do not try to work against the users' freedom,
preferences or try to work despite/regardless of the users' prefs,
advanced settings; I try to work in accordance to his freedome,
preferences, advanced settings. So every link that opens a new window is
clearly, explicitly identified so that the user can override such opening
mode and have/impose his own preferred mode of opening link whatever it
might be:
- in a new secondary window
- in a new tab in the same window
- in the same tab of the same window
- in the background
- not in the background (with focus transferred)

In your example, the new window simply
opens in a new tab for me, so I'm back to it being inaccessible.


It's the other way actually. If you were to create a new window by force,
your code would be considered as anti-accessible because it removes
flexibility from the user, it would go against the will of users, against
their prefs, their settings.

Gérard
--
remove blah to email me

Jul 23 '05 #8
I found a solution in another newsgroup. I was simply missing the attribute
extrachrome=1. Problem solved.
Jul 23 '05 #9

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

Similar topics

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...
5
by: k.vanderstarren | last post by:
Hi All, I'm having a problem that is driving me absolutely batty and I'm hoping that one of you JavaScript gurus can help me out before I go stark raving mad. I am using the function shown...
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...
3
by: BoBi | last post by:
Hi, See the following URL for the concerned page: http://home.scarlet.be/kenya-belgium/list_2_en/a_kenyan_cat_and_a_belgian_cat.html Clicking on "Menu" or "Publication" in the right upper...
4
by: arajunk | last post by:
In Firefox this opens a full size window (maximized) . In IE it opens the partial window requiring user to click restore (upper right) to maximize. What am I missing ? var...
4
by: deBaer | last post by:
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...
16
by: CreativeMind | last post by:
hi, i have a page calendar.aspx which returns selected date i.e window.returnValue=selectedDate; window.close(); it works fine with IE but not for Firefox. i tried...
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.