Javascript disable switches current tab functionality in browser - javascript

Is there a way to accomplished this on browser?
Disable opening another web page
or disable switch current tab functionality in browser
when certain page (in this case my page) is still open?
I want to make a quiz in web, but i want to eliminated the posibility for user search on internet for the answer, but have no idea how to accomplished that.
plis give me a solution..
regards..

No, this isn't possible, for (what I hope are) obvious reasons.

This not possible.
Even if it was possible in theory, how would you stop the user opening another browser (different brand to the current one)?
How would you stop the user from using their mobile phone to search the web?
If this quiz is being run in a controlled environment (like a classroom) you could run the web browser in some sort of kiosk mode with strict policy setup against opening other tabs etc. But if it is being run in a classroom, then you already have someone supervising anyway. Why bother then

Related

periodically reload tab and bring to front

I have a requirement where a few users are required to keep a watch over a dashboard browser page.
My first thought was use some javascript magic that reloads the page, switches to it if it is not active and being the browser window to front. I quickly realized how difficult this (accept for reload) is and that browsers do everything possible to prevent it, with good reason.
On the other hand, I have err, seen some "websites" which show a pop-up telling me that my browser is affected and I need to call the given 800 number. These pop-ups are pretty much impossible to kill. I could use that if I knew how.
I have also considered utilities like ergociser which sit in the taskbar and open a browser window periodically. This could work but it opens a new pop-up window every time, while I am keen to reload it in the same window.
The closest I have come so far is to use alert which does not bring the window to front but it does flash the taskbar.
I am thinking of a chrome extension or firefox add-on that brings named pop-up tab. But I am open to any other ideas. It can be a browser specific solution, and it is ok to require white-listing in pop-up blockers
What is a best way to do this?
UPDATE
There are two close votes for "Too Broad". It is true that I am looking for the right technology to use for this problem, so I cannot refine it with technology-specific details. But short of that, appreciate if someone can give suggestion for narrowing down the problem statement.

Open "small" browser from Outlook

I am going to make an Outlook add-in very soon.
It has the option, that if a user press a button, a browser should be opened, and the user should fill out the required forms on the URL.
Now I don't imagine it is any problem to open a browser from Outlook itself. But I suppose that if you just open a link, then the whole browser will be loaded up, with all tabs, full size and so on.
Is it possible to just open a small browser window, almost like a popup? No tabs or anything. It should just use the users default browser.
I hope you understand my question, and can guide me to a solution :)
To answer you question, take a look at the WebBrowser class. You can put it in a simple windows forms application.
However, unless you have specific requirements to use a specialized browser, I would simply let the system default browser handle any links.
Create and display a custom form. You can use a browser control in that window.

Can we disable browser's buttons(back/forward/refresh) by javascript [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Disable browser's back button
Is there any way to disable browser(specifically IE) BACK button, FORWARD button, REFRESH button by javascript. So that, when ever any user will click on any button nothing will happen.
No, you cannot reliably, reasonably do that. Even IE's "kiosk mode" allows back, forward, and refresh (via keyboard shortcuts).
On an actual web page (a real page out on the web), disabling back/forward/refresh would of course be extremely inappropriate behavior and I assume that's not what you're trying to do. (Instead, use history libraries and such to ensure your page/web app actually works with the back and forward buttons to do what the user expects.)
Mind you, if you provide a link that opens a new window (which will probably actually end up being a new tab in most modern browsers), your page will be the first page in that window's history and so the Back button will automatically be disabled. And if your page doesn't offer any links anywhere else, it'll stay that way. And if the user hasn't gone Back, by definition they can't go Forward. Nothing you can do about Refresh, though.
If you have a genuine reason for actually disabling those actions (some kind of intranet application, that sort of thing), you'll probably have to distribute an actual application (for instance, .Net app via No Touch Deployment or similar) that incorporates a web browser control, which gives you the HTML/CSS/JavaScript environment but with dramatically higher control over that environment.
As far as I know, you can't modify the buttons in a browser with scripts.
Since you're working with IE, you may be able to use either VBScript or JScript, but I doubt you'll be able to disable the reload button.
More reading:
http://www.webdeveloper.com/forum/showthread.php?t=62177

Link Button with No History

I am designing a website for a domestic violence agency and I want to include an "escape" button. However, simply having a link leaves a danger of someone looking in the browser's history or clicking the back button to see where they were.
So, my question is: (1) Is it possible to load webpages and exclude them from the history? (2) Is it possible to disable the back button after following a link to, say, Google?
Thanks in advance for any help!
For disabling the back button:
<script language="text/javascript">
function goNewWin() {
//***Get what is below onto one line***
window.open("backbuttonnewpage.html",'TheNewpop','toolbar=1,
location=1,directories=1,status=1,menubar=1,
scrollbars=1,resizable=1');
//***Get what is above onto one line***
self.close()
}
</script>
Click to go to a new page
from http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911/backbutton.html
No.
However, you could detect the browser and then explain details on how to clear history/caches for their current browser.
Maybe and no. That is entirely browser driven. Some browsers have been known to replace pages in history when window.location.replace(newURL) is called, but that is not guaranteed and not recommended.
Concerning your first question: As far as I know, the browser's history is completely dependant only on the browser's settings. Websites cannot and (should not) try to access any of the browser's preferences and functionality . A website just provides information (i.e. code and resources) - it is the browser's task to decide what to do with it (how to parse and render it).
So in my opinion, the best you can do is to suggest the user to clean one's history or use a "private mode". You even might provide information about how to do that, depending on the user's browser.
In any case: All the best for your project against domestic violence!

How to open a new window (or in a tab), but not give it focus

I have a function that I want to open up a URL in a new tab on a click event, but not give that tab focus. Is this possible with javascript?
You can't steal focus from a newly opened window. It's a security feature preventing sites from "taking control" of your browser. That would be a browser configuration setting.
As far as "hiding" focus from a popup, you might be thinking of what's called "PopUnder". Basically you use window.open() and set the option _blank and the paramater alwaysLowered, but it will not work gracefully for an average website. It requires you to have a signed script and take advantage of the Netscape Security PrivilegeManager, like this:
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead UniversalBrowserAccess"); // etc...
Sorry bro :)
You can attempt to open a new window, then set focus back to the current window. However, user settings may make this impossible, or it might already be the default behaviour.
Pop–unders are used by some web sites probably to disassociate the web site from the window (i.e. so you don't know where it came frome). So they are assuming a certain naivety on behalf of the user. They are considered spam and treated with the same contempt.
If you outline what it is you are trying to achieve using a pop–under, you might get advice on better ways of doing it. Or not. :-)
To my knowledge it is impossible bro.Since the user's browser Settings will conflict with your logic

Categories

Resources