Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
how can i cancel the mouse click event.
Old 01-24-2007, 01:11 AM how can i cancel the mouse click event.
Average Talker

Posts: 28
Name: dinesh s
Trades: 0
hi
i want to cancel all the mouse click events in my page(in firefox).
is it possible.
thanks..
dinesh s is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-24-2007, 06:33 AM Re: how can i cancel the mouse click event.
Korzonek's Avatar
Skilled Talker

Posts: 60
Name: Michael
Location: Warsaw
Trades: 0
I dont realy understand what you want to do,but if you want to cancel them while viewing in ff you have to download fire fox web development tool...
Korzonek is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 01:13 PM Re: how can i cancel the mouse click event.
Tom_M's Avatar
Ultra Talker

Posts: 250
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
It isn't clear what you want to do? Explain what it is you want to do.
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 03:52 PM Re: how can i cancel the mouse click event.
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
WHY would you want to do such a thing ?? Don't you have links that need to be clicked ???
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 07:25 AM Re: how can i cancel the mouse click event.
Skilled Talker

Posts: 94
Trades: 0
i think he means Stop right clicking on a website..
hellhound121 is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 12:51 PM Re: how can i cancel the mouse click event.
Tom_M's Avatar
Ultra Talker

Posts: 250
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
Quote:
Originally Posted by hellhound121 View Post
i think he means Stop right clicking on a website..
If that IS what he means, that's just a little javascript.
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 04:03 PM Re: how can i cancel the mouse click event.
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
And it's also pointless. Any savvy user can get around that no-right-click nonsense in about 5 seconds.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 04:11 PM Re: how can i cancel the mouse click event.
Skilled Talker

Posts: 96
Name: Tudor Barbu
Trades: 0
And disabling right click is incredibly lame and annoying...
__________________

Please login or register to view this content. Registration is FREE
Tudor.b is offline
Reply With Quote
View Public Profile Visit Tudor.b's homepage!
 
Old 01-25-2007, 04:15 PM Re: how can i cancel the mouse click event.
Skilled Talker

Posts: 62
Name: Daniel
Trades: 0
(By the way, this isnt css, its javascript...)

The code for what you want is listed below the post, but like ladyinred said, its rediculously easy to bypass.

put this in the head section of your html file.

Code:
 
<script language="Javascript1.2">

am = "This function is disabled!";

bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
</script>
castis is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 04:33 PM Re: how can i cancel the mouse click event.
Skilled Talker

Posts: 94
Trades: 0
i said i "think" i could be totally wrong
hellhound121 is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 04:40 PM Re: how can i cancel the mouse click event.
Skilled Talker

Posts: 62
Name: Daniel
Trades: 0
Well anything else wouldnt make sense. Im not sure why you would want to cancel the other mouse click event.

EDIT, if you DO want to cancel all mouse click events, consider making your website a solid PDF file...

Last edited by castis; 01-25-2007 at 04:42 PM..
castis is offline
Reply With Quote
View Public Profile
 
Old 11-09-2007, 08:05 AM Re: how can i cancel the mouse click event.
Junior Talker

Posts: 1
Name: Vieron Lima
Trades: 0
In our days web "pages" are not for just viewing and jumping from one link to another.
I’m a web developer and I’m creating lots and many times, huge applications for companies that want intranet enterprise applications.
Many times I face the need to cancel many browser events, including right and left click.
Consider that I have a list and next to each list item I have some add, edit, delete buttons.
(I’ll focus on the delete button) The delete button targets to a link page ->
(e.x.: http.…/item_delete.asp) that deletes the current list item from the database, but I want when the user clicks (left click event) on it, to display a confirmation message to ask if the user is sure about that item deletion.
To do that, I must cancel the left mouse click that user triggers over the delete link. Then it depends on users response (yes:delete - follow links href, no:do not delete - complete event cancel).
And just consider if the browser (the system typically) allows something to happen, then it may have a useful and logical usability for something.


By the way, in order to cancel the event:

HTML Code:
function cancelEvent() {
    try {
        var e = window.event;
        if(!e) e = window.Event;
        if(e) {
            e.returnValue = false;
            e.cancelBubble = true;
            e.stopPropagation();
        }
    } catch(c) {}
    return false;
  }

For example:
 <a href="something.com" onclick="Myfunction(); return cancelEvent()">..... 
lavielima is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how can i cancel the mouse click event.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35195 seconds with 11 queries