Observe the attribute oncontextmenu="return false;". It causes the default right click popup menu to be disabled. It can be used on body tag too.
<html>
<head>
<title>Disable Default Right Click Menutitle> head>
<body> Right click on the following images to observe the effect.<br/> <imgsrc="http://lh5.ggpht.com/alorChhota/R8qXNVDlYMI/AAAAAAAAATA/YS_ab1pnwII/s144/SDSL%20Picnic007.jpg"oncontextmenu="return false;"/> <imgsrc="http://lh5.ggpht.com/alorChhota/R8qXNVDlYMI/AAAAAAAAATA/YS_ab1pnwII/s144/SDSL%20Picnic007.jpg"/> div>
form>
body>
html>
Note: In Opera, default right click popup menu can’t be disabled.
The greatest challenge in web programming, in my opinion, is to make your website compatible to all browsers. [I say - A new browser or even a new version of an old browser is a new pain to programmer.]. Whatever, browser detection is a very important task for web programmer. Following is the JavaScript code to detect browser and OS.
Shimul, my friend, suggested me to add some advanced feature of creating setup project like registry key. This blog contains basic steps of adding a registry key from setup project as well as reading a registry key value from the program.
How to see the registry keys:
Click on Start Menu > Run > regedit [enter]. Here you will see the following.
Most of the time, we, the programmers, want to create the Setup File for our projects. This blog contains the basic steps of creating setup files in .NET. The easy steps are as follows (in MS Visual Studio 2005)-
Create a Setup Project. [File > New > Project]
Add your Project to Setup Project.
Open Solution Explorer window
Right click on Solution Icon
Add Exsiting Project (Here JSAPIObfuscatorProg)
Create Exe File
Right click on Application Folder > Add> Project Output
Select Primary Output of the project
Select Location of Installed Components
Go to Properties of Application Folder
Change Default Location (if you wish)
Make Always Create = true
Add Shortcut to Program Files
Go to properties of User’s Programs Menu
Make Always Create = true
Click on User’s Program Menu
Right Click on the blank white space
Select Create New Shortcut
Choose the target item [Application Folder > Primary Output From…]
Add Shortcut to User’s Desktop
Similar to Program File shortcut
Change Icon of Exe file
Right Click on YOURPROGRAM [Here JSAPIObfuscatorProg]
Select Properties
Select Icon file
Change Name & Icon of Shortcuts
Go to properties of created shortcut from step 5
Change Name
Select Icon : You might have to add an icon to Application Folder. i.Right Click on Application Folderii.Add an *.ico file.
Prerequisites: Sometimes you might need to install .NET framework, Crystal Report etc. before installing your product. In this case, you need to add Pre-requisites. If prerequisites will be installed only if they are not installed in user computer.
Go to Project -> Properties.
Click on Prerequisites button
Select the prerequisites from the list
Choose Download prerequisites from same location as my application option
Build the project. You will get the setup files insides Debug folder.