Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new window disable fullscreen mode 1

Status
Not open for further replies.

stakadush

Programmer
Oct 1, 2001
195
0
0
IL
hey :)
i want to open a new window, that can not be resizable. the problem is that even when i disable resize user can still press F11 and get fullscrren mode. after coming out of fullscreen mode, resizing is enabled!
how can i disable fullscreen mode using window.open function? is it possible?
if not,how can i disable fullscreen (disable F11 key basically)

my current code is:
Code:
function winopen() {
  window.open("main.html", "main", "toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=300");
}

thanks

(-:
 
Hi,
You can disable the F11 code this way..
<SCRIPT LANGUAGE=javascript>
<!--
document.onkeydown = function ()
{
if (122 == event.keyCode)
{
event.keyCode = 0;
return false;
}
}

Regards,
Kiran
 
works great on IE but not really with mozilla :)
i've modified it a bit for mozilla. this is the code i am using now:
Code:
var IE = (document.all) ? 1 : 0;
var DOM = 0;
if (parseInt(navigator.appVersion) >=5) {DOM=1};

function keyDown(evt) {
	if (DOM) {
			if (evt.which == 122) {
				evt.which = 0;
				return false;
		}
	} else {
			if (event.keyCode == 122) {
				event.keyCode = 0;
				return false;
		}
	}
}

document.onkeydown = keyDown;
if (DOM) document.captureEvents(Event.KEYDOWN);

but when i press F11 in mozilla i get the following error:
setting a property that has only a getter

is it possible to bypass this somehow?
thanks

(-:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top