Hi >- shift-click stuff shouldn't break things >(probably doesn't do what the user wants either, but...)
Exactly that is also my problem. Oky not mine but also a customer of mine wants the shift click. Statement: Shift click does the same as click but opens in new window" Problem: I have some functionality that changes a area you could name display-area. The customer now argues that he expects the display-area in a new window. Any Ideas how to solve this? It seems that shift-clicking is not interceptable so that I can hook in my functionality to do something near useful Fabian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Fuchs Sent: Dienstag, 15. August 2006 18:38 To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] Completely off-topic, so flame me "If I hit Ctrl+Alt+Del the computer reboots!" Anyway, the accepted "normal" solution to this is: <a href="#" onclick="blablabla(); return false">bla</a> This makes sure: - page will validate, as "#" is a valid URL - link doesn't do anything (expect for jumping to the top of the page) when Javascript isn't active - shift-click stuff shouldn't break things (probably doesn't do what the user wants either, but...) - "return false" makes sure the browser won't follow the link after your JS stuff has run -Thomas Am 15.08.2006 um 17:23 schrieb Sam: > > There's a lot of old-solutions to this problem lingering on Google, > so it's difficult for me to determine if there's a more modern > solution to this problem. A customer posted a complaint yesterday > about how I'm coding href's when an onclick event is used and the > href should not be used. It seems the complaint is that holding > the shift key and clicking the link opens a new window pointing to > javascript:void(0). > > Reminds me: Doctor, it hurts when I hit my head with this > hammer... (don't hold the shift key and click might be a solution) > > href="#" // I never do this > > href="javascript:void(0)" // this is what I do, but I read void(0) > is deprecated over null? > > should I use something else? > > Sam > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs