IT Community - Software Programming, Web Development and Technical Support

How can we block "Right click-refresh" option on a web-page?

This is a discussion on How can we block "Right click-refresh" option on a web-page? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; How can we block "Right click-refresh" option on a web-page?using javascript...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-19-2007, 12:12 AM
GDevakii GDevakii is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 138
GDevakii is on a distinguished road
Default How can we block "Right click-refresh" option on a web-page?

How can we block "Right click-refresh" option on a web-page?using javascript
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-25-2007, 02:35 AM
muthu muthu is offline
D-Web Trainee
 
Join Date: Sep 2007
Posts: 5
muthu is on a distinguished road
Default Re: How can we block "Right click-refresh" option on a web-page?

hi

<script type="text/javascript">
var message="Function Disabled!";
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.all){
if (e.which==2||e.which==3){
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false;")
</script>
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
1 page site gets #1 in Google for "stock trading" vadivelanvaidyanathan Search Engine Optimization 1 02-16-2008 12:13 PM
Exception "security block" while connecting to bluetooth device S.Vinothkumar Mobile Software Development 13 11-10-2007 03:19 AM
I keep getting "Data Missing" when I click the "back" button in my browser. How can I oxygen HTML, CSS and Javascript Coding Techniques 1 07-28-2007 01:12 AM
Why do I get "HTTP 500" error(or "(DLL)initialization routine failed")in my browser? kingmaker ASP and ASP.NET Programming 1 07-20-2007 04:38 AM
Difference between a "assignment operator" and a "copy constructor"? vigneshgets C and C++ Programming 2 07-12-2007 05:30 AM


All times are GMT -7. The time now is 12:50 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0