What I want is simple - I'd like an that will cause the normal Preferences dialog to open with my extension's preference pane highlighted. I would have thought
<em:optionsURL>javascript:openPreferences("my_pref_pane");</em:optionsURL>
would have done it, but it doesn't. I also would have thought
<em:optionsURL>chrome://myapp/browser/options.xul</em:optionsURL>
, with options.xul having <script>javascript:openPreferences("my_pref_pane"); window.close(); </script>, would have done it, but Firefox just displays the script in the resulting popup window and refuses to execute it. How can I force Firefox to not assume I want to pop up some custom configuration dialog and just use the main preferences I already wrote?
(And why can't any helpful documentation exist? </rhetoricalQuestion>)
This will cause Firefox to open the addons manager to your OWN addon's addon page.
var am = require("sdk/preferences/utils");
var self = require("sdk/self");
// Open the add-on manager with the preference page for this add-on.
am.open(self);
// Returns a promise that resolves once the tab is open.
Credit goes to freaktechnic and his gist.
Related
We have an onprem crm 2016. I'm opening an html webresource on a click of a ribbon button. I'm using Xrm.Utility.openWebResource(...). The problem with that is we're using IE11 and all users' browsers are configured to let IE decide how to open pop ups.
Guess what, IE decides to open a new tab! Is there a way to open an html web resource in a new window without changing the users' browser options?
Xrm.Utility.openWebResource() performs different in Chrome compared to IE11. Below options are there, pick it what suits you.
window.open()
Unsupported way to open modal dialog - showModalDialog
Xrm.Internal.openDialog()
Source
Xrm.Utility.openEntityForm() has an option to mention as openInNewWindow = true in parameter windowOptions which is not available for openWebResource()
I am working in vb.net 2005. I am in a position to start a new browser with process.start().
Now I have to open that browser in a specific size(say height:300 width:500)
Process.Start("firefox.exe", "abc.html")
and I have written this following code on load of abc.html
var myRef = window.open('abc.html','','left=20,top=20,width=300,height=500');
but it does not resize.
If I add 1 button on this page and click on it (by writing same code on its click event), a new window with expected size opens.
Am I going wrong somewhere?
Thanx.
Firefox doesn't let pages resize the window by default. Also note, if you already have Firefox running then browser preferences will dictate whether you get a new window or a tab. You can force a separate instance of Firefox by using the -no-remote command line flag, but then you won't be able to use the default profile (only one Firefox instance per profile).
My questions for you are:
Why are you launching Firefox from another executable at all instead of just having users click on a link and have it open in their default browser?
If you do need to launch Firefox from an executable, why spend all this effort overriding the user's preferences and settings?
If you' re launching from an executable and are keen to annoy your users whatever the cost, why not just find and resize the Firefox window using the normal Windows APIs?
I am building a site which when you click a link it opens up two things; it opens up a pop-up and an external website in a new tab. This is so the user can interact with the pop-up whilst he/she browses the external webpage.
This was working fine for me but I think when my FF updated to version 15.0.1 on OSX lion, I can no longer get this to behave the way I want it to.
I have even changed the settings in FF: FF->Preferences->Tabs->Open new window in Tab instead to off and with no such luck.
I have also noticed that facebook connect on any site will open a new tab rather than a new pop-up too.
I can't seem to find any documentation on the web stating that this is FF's native behavior, even in their changelog.
Here is my javascript trigger which I am certain all the parameters are correct:
popWin = window.open('http://somesite.com','myTargetWindowName','height=650,width=450,pageXOffset=900,pageYOffset=900,scrollbars=yes');
I have some JavaScript that makes an AJAX call and, if the call fails, opens a new windows (tab in Firefox) and displays the response from the server in that window. This is very convenient for debugging, because the error is typically from Pylons, so it's a full HTML page.
The only problem is that the new tab becomes the active tab, which would totally confuse a regular user. Is there any way to open the tab/window, but not make it active, ie. keep the current active window?
My code currently looks like this:
errorWindow = window.open("", "TCerrorWindow")
if (errorWindow)
errorWindow.document.write(xhr.responseText);
You can call errorWindow.blur(); window.focus(); after, forcing the browser to return focus to the previous window.
The effect you're trying to achieve is commonly called a pop-under window.
AFAIK this is not possible, as a security measure against pop-under windows. For debugging purposes you could
use Firebug (with a handy console, where you can output your own log messages from the code)
create a debug layer (div) on your page, where you output error messages in case an error happens
I'm working on an app that uses this to open the homepage of the application after they have successfully entered the login details:
window.open("app_homepage_url","myApp","toolbar=no,status=yes,scrollbars=no,location=no,menubar=no,directories=no");
This normally works as expected and hides the toolbar but one user has reported that they still have the toolbar showing. They are using Internet Explorer.
My first thought was maybe there's already a window open with the name 'myApp' and the toolbar shown so the homepage is getting loaded into that window instead of a new one but I tried doing that and the application does not let you log in due to the way the login is handled with sessions so I don't think it can be that.
The comment on this answer seems to suggest there is a way to force the browser to always show the toolbar so I wonder if it is to do with this. Does anyone know how you actually do this?
Any other ideas?
This might be a browser configuration issue.
Have a test on the following configuration settings on IE7 and IE8:
Goto Tools->Internet Options->Security Tab
Select an appropriate security zone settings
Click on Custom level.. button
On the settings tab, look for Miscellaneous Node
Then have a test on the following settings
Allow script-initiated windows without size or position constraint
All websites to open windows without address or status bar.
Closing the browser might helpful when changing configuration settings.