Disabling menu options in IE

Dsrt

Baseband Member
Messages
51
Problem: I have an online form that users fill out. At the bottom of the form is a print button. If the users click the print button, it won't let them print until all mandatory fields are filled in.

The issue that we have is that instead of hitting the print button at the bottom, the users are using the file > Print button in IE...this bypasses the mandatory field check and allows them to print the form without all the required information.

What I would like to do is make it so they cannot use the File > Print feature in Internet Explorer. Does anyone know what code I can use to disable the toolbar in general or at least take away the ability to print from the toolbar while on this page?

Thanks in advance.
 
nothing can stop them pressing control and P even if you take away the form...
 
Ya, I'm kinda counting on the fact that most of the end users we deal with don't know keyboard shortcuts. It's easy to find the File > Print menu.

I was thinking that if I could get that disabled, maybe they'd look for the "print" button on the bottom of the screen. haha
 
OK... ignorance is bliss, but I bet it won't be foolproof...

anyway...
you can't remove the toolbars from a windows that's already open, but you can open a new wnidow without then...

I got a code sample from here...
http://javascript.internet.com/navigation/menu-popup.html

so I guess you should just edit that to do what you want...


Code:
<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! [url]http://javascript.internet.com[/url] -->

<!-- Begin
function formHandler(form) {
var windowprops = "height=500,width=500,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

var URL = form.site.options[form.site.selectedIndex].value;
popup = window.open(URL,"MenuPopup",windowprops);
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
<form name=form>
<select name=site SIZE=1 onChange="formHandler(this.form)">
<option value="http://www.yoursite.com">Go to....
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.metacrawler.com">Metacrawler
<option value="http://www.altavista.digital.com">Altavista
<option value="http://www.webcrawler.com">Webcrawler
<option value="http://www.lycos.com">Lycos
<option value="http://javascript.internet.com">JavaScript Source
</select>
</form>
</center>
Bear in mind a lot of pop up bockers will stop that from appearnig, (including -I think) windows XP SP2 popup blocker...
 
Ya know, other than the ctrl+p issue..I think this well help a lot. Thanks for the code, I appreciate it.
 
Back
Top Bottom