aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Disabling the links in a document on holding the Shift Key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disabling the links in a document on holding the Shift Key" Watch "Disabling the links in a document on holding the Shift Key" New topic
Author

Disabling the links in a document on holding the Shift Key

Vishal Gandhi
Greenhorn

Joined: Jan 18, 2006
Posts: 3
I need to disable the links in a document whenever the Shift key is pressed. But once the Shift Key is released, the links have to be enabled again. This i because, i wish to avoid the Ctrl-N problem and on clicking on any link while holding the Shift key, the problem resurfaces with a new window sharing the same session getting popped up.
Also, any thing apart from <links, left arrow and right arrow key> has to be enabled. I got some script but because of that the radio button was allowing to be not selected at all.
Please provide me your inputs for this problem asap.
Solutions specific to IE will also suffice.
[ January 19, 2006: Message edited by: Bear Bibeault ]
Himanshu Bisht
Ranch Hand

Joined: Aug 27, 2004
Posts: 96
Well disabling all links on shift press is not a bright idea.I can think of two solutions

1) Hide mouse pointer on shift press.I think it is possible in javascript.

2) Second, try to write all hyperlinks using javascript i.e. fwd all request through javascript.Javascript doesn't allow "Shift+Click" to open a new window so this could also be a solution to your problem.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not hide the mouse!

This will not work if the person disables JavaScript, have a browser that does not allow right click to be disabled, and many others.

If you are having problems with multile sessions or such, then you really need to attack this at the server level.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Point #1: Eric is right -- applying band-aids will get you nowhere. Solve the real problem.

Point #2: Please read this to see why putting URGENT in your titles and posts is not a good idea. I have removed it from your subject title for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tiku Popat
Greenhorn

Joined: Jan 11, 2006
Posts: 3
I also need answer to this problem. Does anyone know how to disable the new browser that opens when one hits Shift and click on the link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling the links in a document on holding the Shift Key