How can we hide the statusbar of a current page using javascript.I used window.statusbar.visible = false but its not working.Please give me a solution
regards
Arun
I don't think you can hide it for an already opened window : it's not an element of the page, but an element of the browser's user interface -- which means it's outside of your concern.
(Even if you can open a new window that doesn't have a status-bar ;; which might not be liked that much by some users, btw)
Status bars are something people expect to see in every browser window. By not hiding it, you give users the first sense of safety that the content they see is still being served within a browser. You may be trying to simulate a desktop application experience on the web. But once you code for the web, you have to happily accept the standard elements that come with it.
Technically, no, you cannot hide the status bar after opening the window.
Related
I'm trying to open a new window with a specific content e.g. it is displaying another view that i've created. The opened window/popup/dialog has to always on top and draggable. While it is on top I want to edit and work on the background window.
Is this possible? If it is, how can I let the opened window/popup/dialog display another view or add some conent to it?
I've tried to open a new window with a simple js function window.open(),
but I cannot let it be on top and edit some background window content.
Maybe there are other ways to do so? Maybe some UI5 methods will accomplish what I'm looking for?
I am sorry to say, but there is no standard way to do so.
Windows are managed by your browser, so you can open it in a new window, but it is not part of the initial application if you do so. If you want to use windows you could open a new app in the new window. here is a post on how the communication between those apps can work: Communication between tabs or windows
Popovers allow you to access the rest of the app while they are open, but once you do the popover closes. There is a property, that stops it from closing, but this property also blocks the wished for interaction. (the property is named modal check here: https://ui5.sap.com/#/api/sap.m.Popover/) Like every UI5 Element it can be made draggable, refer to https://ui5.sap.com/#/api/sap.ui.core.dnd.DragDropBase.
Dialogs do not allow any interaction with the rest of the app and i did not find a way to bypass it. Its has a build in feature for drag and drop though.
However
If you can do without the draggable part there is a way you can make it kind of work. It will only work as intended on desktops or large enough tablets.
You can use the FlexibleCollumnLayout and open your content in a new column. That allows you to interact with the "Dialog" Content at the same time as the content of you main page. Like this the "Dialog" will always be to the side, so it is not draggable.
If you really want to have the draggable part you would have to create a custom control. Read up on the topic here: https://ui5.sap.com/#/topic/8dcab0011d274051808f959800cabf9f
I hope I could help you,
Eric
Thanks for you answer, but I found a solution in the meantime with this help:
https://github.com/SAP/openui5/issues/1022
By setting oDialog.oPopup.setModal(false); it is able to even set a sap.m.Dialog non-modal. Then I set draggable: true resizable: true and gave it a styleclass with a very high z-Index and got exactly what I was looking for. A non-modal sap.m.Dialog, that is draggable and always on top of everything while the background can still be edited.
So I decided recently to create a firefox extension I have been thinking about, but do not have any prior experience with it. I read on the official tutorials and figured that the addons sdk seemed to fit me well, but I seem to have hit a hitch using it.
What I want to do is create an options popup dialog, similar to the one you see if you press alt-tools-options. That is, a border with title and close button on the upper part, and a bigger area inside the window where I can define an "intuitive" (default elements with the skin the user is used to) GUI.
The tabs at the top (general, privacy security etc.) is nothing I really need, though would not hurt either.
So the issue is that from my searches, when you use addon sdk, you are not supposed to use XUL which has those elements, but instead you seem to be supposed to create something custom using HTML in a panel. I don't think its possible to create the top-bar akin to the real options-menu when using that, although if I am wrong I would not mind being corrected.
I had a similar issue before, where I wanted a drop-down menu from the toolbar similar to the default ones, which I solved thanks to: How to add a dropdown menu to a firefox addon sdk powered addon toolbar button?.
Might be worth noting that that the button opening the options dialog is one of the menuitems created as described there.
I was considering that it could probably be possible (aka I am not sure) to use something akin to this, but sadly I do not know how I would create a "separate" (drag-able) popup that I could use this on.
If possible, I would prefer there to exist a solution, but if someone knows that it is indeed impossible, please do post that so and I can give up without regrets and just make some sort of custom HTML panel instead :)
tldr:
Is there a way to create a popup dialog similar (in style) to the options window you can open using alt-tools-options in firefox when developing using addon sdk?
Essentially, you aren't supposed to, at least not with the SDK.
But then again, it is still possible, but you need to do a lot of stuff yourself:
You need to register a chrome: package for your add-on, as the resource: URIs the SDK uses internally do not work correctly for XUL windows. Create a Chrome Registration (chrome.manifest file). The SDK supports this since Firefox 24 IIRC.
Create the XUL file. For preferences/options windows, there is already the <prefwindow> binding. Look at other extensions and or the Firefox Options dialog (which is a huge thing with multiple overlays, so better look at other extensions). Place the XUL file in chrome/content/<somefile>.xul. This will then correspond to chrome://<registered_package_from_1>/content/<somefile>.xul.
Implement something that will actually display the window. Normally non-SDK add-ons would just put em:optionsURL into their install.rdf, to have the Add-On Manager automatically create a Preferences button that will open the specified URL, but in the SDK this is generated from package.json and there is no way to put optionsURL in package.json if I'm not mistaken. But you could do other things, like using a simple-prefs type: control button to have a button in your about:addons page, or add it to some browser menu (which would require yet another heap of XUL-modifying, require("chrome") code.). To actually open the dialog, you could use window/utils.openDialog.
Don't forget to close any open windows again when your add-on gets unloaded.
As you can see, not a simple task...
If you're just after preferences in general, consider using simple-prefs.
I would like to identify browser tabs (on my domain) using JavaScript.
I mean that if user open several tabs with my website and submit web form only on one page I want to notify only this page, even if user moves from this page.
It should be max cross browsers solution.
P.S. One of the possible solutions is using "window.name" property, but I do not want to use it because somebody else can use it.
P.S-2: I found one more possible solution: using sessionStorage. It supported by FF3.5+, Chrome4+, Safari4+, Opera10.5+, and IE8+. Oooohhh, I need IE7!!!!
Thank you in advance!
I don't think this can be done. Each browser tab that is opened is basically like a new browser instance. Just like if the user opened another browser. One tab knows nothing about the other tab by design. This is how it should be. Can you imagine the implications if a web site developer could add code to their page to "see" what other sites you have opened in your browser?
window.name is the only persistent data element you can use for this purpose, as described your requirements.
I want to notify only this page, even if user moves from this page.
This is impossible. Once a user navigates away from a page, you lose control over that tab. You can't push to a page, it needs to make a server request FROM that page, even if it's ajax.
Using sessionStorage. It supported by FF3.5+, Chrome4+, Safari4+, Opera10.5+, and IE8+.
For IE7 using "window.name" property.
I would like to hide the status bar in Firefox when the mouse is over a link. Here is what the status bar is :
http://support.mozilla.com/en-US/kb/what-happened-status-bar
I already tried window.status with javascript but it doesn't work even if I set dom.disable_window_status_change to false. I didn't find any add-ons ever.
Does someone have a solution ?
NB : this is only for a web application which won't be published on the Internet, my goal is not to hide a target link :)
Thank you.
This won't be possible / allowed by the browser for security reasons.
If this is an absolute requirement, is specific to Firefox, and you control the web browsers for the users that will be using this application, you could write your own Firefox extension to do this for your specific site.
This will not work because this is built in for safety reasons.
To prevent phishing for example or other bad things you can do.
I mean I'm not sure but what you could do is leave the a href ="" tag attribute empty or just insert href="#" and add some javascript which redirects the user to the page you want when he clicks that link. But I'm really not sure if this would work in the way you want it !
You can't hide it when it is over a link, but one way to get around it would be to attach click events to span elements that change the window location. So they would act like links, but there wouldn't be a href attribute to show in the status.
I want to have a link or something which could be inserted in an email/forum etc. It's a typical url. But I would like that link to be opened in a custom sized new browser window ( say 800 x 600 ) . It sounds weird, but that is the requirement. Can it be achieved somehow?
Thanks
In an email?
You can't. Email clients insane enough to execute JavaScript are all by unheard of.
In a forum?
Assuming you aren't the administrator of it, you can't. Forums insane enough to encourage XSS attacks are, again, all but unheard of.
Ok. This is how we could kinda achieve this. Let that link be a normal link. It would contain the custom code to create a desired popup on invocation. But the issue is popup blocker in browser. But they somehow liked it.So basically a page opens up which launches the popup without user interference.