View Full Version : disable some buttons
stryper
04-18-2003, 11:42 PM
does anyone knows how to make disable the bottons for refresh and for back in IE.
or does anyone knows how to create a popup window just with the frame without the bars or menues.
Thanks
smeagol
04-19-2003, 02:06 AM
Can't disable those buttons.....
Here's a quick script I whipped up to open a new window with features you specify:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="JavaScript">
function openChildWindow(loc){
// 0 = Hide 1 = Show
var ToolBar = 0;
var Location = 0;
var Directories = 0;
var Status = 0;
var MenuBar = 0;
var ScrollBars = 0;
var Resizable = 0;
//Child Window Size
var Width = 800;
var Height = 600;
// DO NOT EDIT BEYOND THIS LINE
var Features = "'toolbar=" + ToolBar + ",location=" + Location + ",directories=" + Directories + ",status=" + Status + ",menubar=" + MenuBar + ",scrollbars=" + ScrollBars + ",resizable=" + Resizable + ",width=" + Width + ",height=" + Height + "'"
window.open(loc, 'child_window', Features);
}
</script>
</HEAD>
<BODY>
Make your links like this: <a href="http://www.google.com" onclick="openChildWindow(this.href);return false;">Google</a>
</BODY>
</HTML>
Let me know if you have trouble with it. I wrote it fairly quickly....
shlagish
04-19-2003, 05:36 PM
<html>
<body>
<a href="#" onClick="open('URL', 'name', 'features')">link</a>
</body>
</html>
An example of a URL that can be used is: http://www.msn.ca/
An example of a name that can be used is: TIMEH
An example of features that can be used is: toolbar=yes, location=no, directories=yes
An example of a working link with only the frame would be:
<a href="#" onClick='open("http://www.msn.ca", "new_window",
"toolbar=no, location=no,
directories=no, status=no, menubar=no,
scrollbars=no")'>link</a>
Other features the window can have:
Width (width)
ei: width=800
Height (height)
ei: height=600
resizable (can the user resize the window?)
ei: resizable=yes
top (position relative to the screen)
ei: top=100
left (position relative to the screen)
ei: left=100
shlagish
P.S I don't think you can take the title bar out
brothercake
04-19-2003, 10:30 PM
You'd still be able to refresh by pressing F5, and go back by pressing the backspace key, among numerous other methods.
shlagish
04-20-2003, 06:56 PM
indeed...
Except if you disable theese buttons (the same way you would disable right clicks)
brothercake
04-20-2003, 10:45 PM
You can't disable F5, or stop mouse gestures from working, and even if you could ... why would you want to do that? If you lock down my interface that much, I'll just curse your site and go elsewhere.
What do you gain by annoying your visitors like that?
And anyway it still wouldn't work on me; I just run a bookmarklet that disables your keyboard and mouse handlers, and I have my interface back :p
hypedup.co.uk
08-31-2003, 07:08 PM
hi. i wanted to disable the backspace button, F5 button and CTRL+R to stop people going back or pressing refresh in my game (as it would mess the scores up) and i came to this thread while looking for help.
you say its not possible but i think ive done it. go to www.hypedup.f2s.com/games/quiz.html, click on 'click here to play', choose any answer for question 1 and then when you are on question 2, you shouldnt be able to go back or refresh.
liorean
08-31-2003, 07:31 PM
Sorry, but I can in moz1.5b and ie6w. In op7.11, I get a message that I can't, but when it's gone I find myself one page back.
Besides, using gestures or rockers I can in op and moz, and in op and moz (forcing all windows into new tabs) I can use the back key in the toolbar as well.
The easiest way to work around this would be to simply never change page, but allow one page to contain everything, only displaying one question at a time.
brothercake
09-01-2003, 04:18 AM
I just pressed "backspace" and it went back one, like it should. And then I pressed "F5" and it refreshed, like it should.
hypedup.co.uk
09-01-2003, 10:21 PM
thats strange, it works perfectly on both my home pc and work pc (both on IE6).
liorean, i did think i should have made it so it was all on the one page, but that was after i finished doing it and didnt want to waste all the work i had done so left it as it was. i will probably do that next time i change it.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.