Showing posts with label Tips and Tricks. Show all posts
Showing posts with label Tips and Tricks. Show all posts
1
Just add following functions to your web page's body tag.
one drawback is it will not work in mozilla, but we have another workaround for this,just add onmousedown function also in the body tag:
as we added in body tag, you can add these functions in any elements of your web pages for preventing selection
Posted on 1:30 AM by prajeesh and filed under
Tips and Tricks
In my previous post I discussed about disabling the right context menu in a web page , here we can discuss on how to prevent text selection in the web page, if you want to prevent normal users copying content of your web page then it will be useful.
Just add following functions to your web page's body tag.
one drawback is it will not work in mozilla, but we have another workaround for this,just add onmousedown function also in the body tag:
as we added in body tag, you can add these functions in any elements of your web pages for preventing selection
0
Alternatively, you can show an alert saying "Right click disabled" if you call a function from body tag's oncontextmenu event, for eg:-
Disclaimer: I have tested this functions in IE7 and Mozilla 3.0 only , it will not work in Opera.
Enjoy coding
Posted on 9:46 PM by prajeesh and filed under
Tips and Tricks
Some websites does not allow right click context menu option for security reasons, you can also achieve this by adding following code to your body tag of the page.
Alternatively, you can show an alert saying "Right click disabled" if you call a function from body tag's oncontextmenu event, for eg:-
Disclaimer: I have tested this functions in IE7 and Mozilla 3.0 only , it will not work in Opera.
Enjoy coding
0
Please note that it will not work in Mozilla.
Posted on 9:12 PM by prajeesh and filed under
Tips and Tricks
In some websites you may have noticed a fade effect while browsing the pages, we may feel an ajax effect and may not feel slow page load, just add the following meta tag to your page before the body tag.
Please note that it will not work in Mozilla.


