Is it possible to remove the print dialog header/footer? - css

I have an online application that the user needs to print. However, I don't want the default header/footer included in the print dialog:
Can I change that programmatically? I know there is an option, but I don't want to have to rely on the user unchecking that box.

No, you can't do that as far as I know.

Related

How to create a text area which takes styles

I am writing an application, the use case is admin can enter some text in text area, the same will be displayed to the logged in user.
Here my problem is, if admin copies some code from some editor like eclipse/ intelliJ IDE, the code and style also should get copied to the text box.
So that user would be able to see it in proper format/style.
Is there any way to achieve this?
Thanks and Best Regards,
Kishna
Unfortunately that is not possible.
The textarea is not designed for that purpose.
Read here for further information.

Hide browse button inside file input

So far I managed to make my upload button act like a file input but now I don't want the browse button anymore and unfortunately I don't know how to get rid of it.
Any ideas?
The best idea for fixing this would be to create a custom file input. This might seem painful at first but is the best way to have full control over your file input design.
Look at https://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/ for one of the ways to do this.
Another way involves an ugly work around that is widely used. The thread for the following is Hide the browse button on a input type=file

Redactor JS editor, custom external toolbar solution with plugin

I'm trying to create a totally custom/external toolbar for Redactor. So far, I think the best way to do this is to actually turn off the toolbar by default, and create a plugin for it.
I was able to do this successfully wit my custom feature set, but I can't indicate the state of the text in my toolbar itself. (ie: if a user changes the fontSize, and later on clicks in the middle of the word/sentence, I wanna be able to display that on the toolbar somehow)
Has anybody else run into this?
thanks,
--iM

Disable --COMMAND-- and --INSERT-- mode in QtCreator's texteditor

Somehow I managed to get QtCreator's text mode into --COMMAND-- or --INSERT-- mode.
I don't care what it is or how it works. How do I get rid of it?
All I care about is normal text-editing without these strange modes.
One of them lets me select text-parts but not delete them.
My mouse-cursor is now even missing.
May be, you've enabled fakevim in settings. Then, disable it.

How to hide browser's menu?

I am developing an ASP.NET application for an online quiz test. The set of questions would be randomly selected from a pool of questions. The application works fine, but I want to hide the browser menu option (so that user cannot save or print the test) when the quiz page is shown. I do not want to open a new popup window. So how do I do this for the active window.
The application consists of around 5 web pages, and the test is on pages 3 and 4. So I want the menu to be hidden only on pages 3 and 4. Is this possible and how do I do this?
Thanks in advance
This isn't possible. You can only hide the menu bar in a popup window.
Either way, though, the user can always right-click and select Print, or use a shortcut like Ctrl + P. And even if you could hide the menu, they could just disable JavaScript. If they really want to print/save the quiz, you won't stop them. I suggest finding another workaround.
I don't think it is possible to do what you are asking.
And remember that there are other ways to print than using the menu of the browser : Ctrl+P generally does that , it's also possible to "save the page" from the right-click menu or using Ctrl+S -- and, of course, there is always print-screen ;-)
The best "protection" you can probably have is defining a correct license (which means you might need a lawyer, to get something solid), that explicitly forbids re-distribution of questions : this way, your users can re-use the questions for them -- you cannot prevent that, anyway -- but can't re-distribute them.
Of course, this is probably only worth it if you are developping some quizz with questions that you are going to sell.
Once the page is rendered to the screen the ultimate control goes to the user. He can turn off javascript and do the necessary job or he can capture the page and so many ways.
Better not to try doing this.
As long as the data is in the user's computer he may access it in one way or another, and i'm not sure its worth the hassle.
If you want to deny printing, you may try using some special CSS media types (like definning some styles with display:none or color:#fff).
http://www.w3schools.com/CSS/css_mediatypes.asp
But even like this the user might simply press PrntScr :)
You may also intercept ctrl+P keystrokes, by using an onKeyDown event on the whole HTML body and stop the bubling, but it may not work the same cross-browser.
You may also deny right-clicking on the page by handling the onContextMenu event ( http://msdn.microsoft.com/en-us/library/ms536914%28VS.85%29.aspx )
Also, the questions should be rendered as images, or deny selecting text from the page so the user wont be able to copy/paste the questions in an email (http://www.dhtmlcentral.com/forums//archive/index.php/t-18008.html mmight help)

Resources