Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-26-2005, 11:52 AM   #1
Baseband Member
 
Join Date: Jul 2005
Posts: 29
Default Disabling menu options in IE

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.
__________________

Dsrt is offline   Reply With Quote
Old 09-26-2005, 12:05 PM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,003
Default Re: Disabling menu options in IE

nothing can stop them pressing control and P even if you take away the form...
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-26-2005, 12:51 PM   #3
Baseband Member
 
Join Date: Jul 2005
Posts: 29
Default

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
Dsrt is offline   Reply With Quote
Old 09-26-2005, 04:10 PM   #4
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,003
Default Re: Disabling menu options in IE

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/navig...enu-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!! http://javascript.internet.com -->

<!-- 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...
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-26-2005, 04:22 PM   #5
Baseband Member
 
Join Date: Jul 2005
Posts: 29
Default

Ya know, other than the ctrl+p issue..I think this well help a lot. Thanks for the code, I appreciate it.
Dsrt is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0