Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts

    right click in NS

    Hi,
    I know this practice is frowned upon on the open web but i would like
    to use the right mouse click as an undo button on my intranet page.

    It works fine in IE with the oncontextmenu event, its the last step i
    need to get my code cross-browser as everything else works.

    There are some users who refuse to use IE and want to use Netscape
    so i would like to get it functioning the same in all browsers
    Can it be done or does NS absolutely disallow it?
    Any help appreciated
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ez4ne12c
    There are some users who refuse to use IE and want to use Netscape
    use an HTA for your intranet, then they won't know wot they're using and you'll be able to finer control over your code. also, you'll be able to use ActiveX for any natty windows' coding you may need to do.
    *keep it simple (TM)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow i never even heard of HTA before. Looks interesting.
    Unfortunately the users are linux/unix users hence the aversion to IE..
    I dont think some of them even have a windows box..

    What I have tried is

    <span id='my_map' onclick='get_latlon();' onContextMenu='undo_latlon();return false;'><img src='mymap'></span>

    good for IE 5.5+
    dont seem to work in NS..7.1 Mozilla 5.0...

    any suggestions would be appreciated?
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ez4ne12c
    Unfortunately the users are linux/unix users hence the aversion to IE. any suggestions would be appreciated?
    then if some are using Mozilla anyways, then why not base your whole app on Mozilla and create it using XUL?
    *keep it simple (TM)

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ez4ne12c
    Unfortunately the users are linux/unix users hence the aversion to IE..
    I dont think some of them even have a windows box..
    This doesn't sound like an intranet

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Willy Duitt
    This doesn't sound like an intranet
    not necessarily, Willy. we've got Macs on our network, as well as PCs. but it still counts as an intranet - well, it would if we actually had an intranet (as in the software), not just the internet network!
    *keep it simple (TM)

  • #7
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jbot
    not necessarily, Willy. we've got Macs on our network, as well as PCs. but it still counts as an intranet - well, it would if we actually had an intranet (as in the software), not just the internet network!

    My comment was mostly due to this statement: "I dont think some of them even have a windows box.."

    I would think in a controlled enviorment you would know what your users are using... Besides, I really don't care either way and I have long ago stopped answering these types of browser disabling questions, regardless of how they are packaged... But I have recently noticed that alot of people are now packaging their browser disabling questions as intranet related regardless if it is web based or not, with the hope of avoiding the entire accessibility and morality rants which inevitably follow these types of questions...

    Carryon...

    .....Willy

  • #8
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Willy Duitt
    I really don't care either way and I have long ago stopped answering these types of browser disabling questions, regardless of how they are packaged.
    fair play. i feel like that. but i also feel it's better to stop others from following suit rather than merely disuade the original poster. that's all.


    Quote Originally Posted by Willy Duitt
    But I have recently noticed that alot of people are now packaging their browser disabling questions as intranet related regardless if it is web based or not, with the hope of avoiding the entire accessibility and morality rants which inevitably follow these types of questions...
    yeah, me too. some people have no shame.


    btw: you replied unnervingly quickly. did you have a premonition of my response. LOL
    *keep it simple (TM)

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In all honesty this is not a packaged question.
    We have every type of machine on our network.
    HP servers, supercomputers, cray, NEC, PC running windows linux
    MACs.. you name it we have it ..
    we are all on the same domain, thats what i refer to as a
    our intranet, albeit a large one. It is a large organisation.
    Anyway I have put an undo button on for NS users.. it works in IE as well
    Its just alot easier for users to undo rightclick than go to a button..

    I would prefer not to take away the context menu.
    I can only see onclick (left click) and oncontextmenu (right click)
    are there any other click events i could use?
    I have tried onDoubleClick but it just takes the onclick event
    OnMouseDown and OnMouseUp wont work in this case

    I would be really happy to try another workable solution if anyone knows one.
    ez
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #10
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Quote Originally Posted by ez4ne12c
    Its just alot easier for users to undo rightclick than go to a button..
    Why?
    Isn't this much easier for users?
    <input type="button" value="Undo" onclick="undo()" />

    than right clicking something? You would have to inform the user that the right click does undo by way of a tooltip or something.

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey glenngv,
    thanks for all your help in the past.
    Its easier because the users are selecting points on a large image.
    The coordinates of the points are registered.
    If the user makes a mistake, or wants to backtrack along
    the chosen path its just alot quicker to right click than to get the mouse out
    of the image and onto a button, then back to very close to where you were
    before. It really functions efficiently for users under IE
    NS users will be dragging the mouse back and forward alot so
    i am trying to save them some effort. Can I somehow use another mouse feature like middle button, or double click that way users can keep their context menu. It seems to me the only click event i can use cross-browser
    is left click...is that true?
    ez

    PS Willy.. lighten up mate.
    To somewhat rephrase what i need and what i dont need..

    I dont want to disable the browser, if I did that, I would probably lose my job.
    I dont want to take away the context menu. I would like the users to keep all
    the functionality they are used to..

    i do need a mouse click event other than onclick.
    I need it to work cross browser.
    It would be great if this hypothetical mouse click
    event was available to me, a developer, and not already pre-assigned by the browser vendor for a particular purpose (such as the right mouse button for a context menu.)

    I have a manual that states there are click events such as doubleClick
    but these dont seem to work... for me anyway, what about onmiddlebutton??

    So i am stuck...
    In IE i can only use onclick and oncontextmenu...
    as these are the only 2 mouse click events that work for me in IE..
    That forces me to consider the same functionality in NS, hence my question.

    Take the question on face value, I have never asked a veiled or packaged question on this, or any other forum.

    If the answer is it cant be done then thanks for the information.
    If someone has a solution ... ditto that would be fantastic.
    ez
    Last edited by ez4ne12c; 12-15-2004 at 12:11 PM.
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Why not make it toggle? When you click an already clicked coordinate, you unregister it.

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    Atlanta, GA.
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript can capture and use the right mouse click event in NS

    I make no judgement as to how you should design your application.
    The question was (basically)
    "can javascript capture and use the right mouse click event in NS"
    and the answer is yes
    Code:
    <script>
    if(document.captureEvents)
    {
    	document.captureEvents(Event.MOUSECLICK);
    	document.onclick=function catchNsMouseEvent(nsEvent) 
    	{
    		if(nsEvent.which == 3)
    		{
    			alert("Right Click");
    			return false;
    		}
    	}
    }
    </script>

  • #14
    New Coder
    Join Date
    Feb 2003
    Location
    Miami. Fl.
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    senseless

    I think none of you guys know what you are talking about.

    Over & out

  • #15
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by andilcho
    I think none of you guys know what you are talking about.
    what's that supposed to mean?
    *keep it simple (TM)


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •