AJAX Inline Dictionary like WallStreetJournal.com 52
chevoldavis writes "Highlight any text on this site then right click. A tooltip containing the definition of the selected word should show up. This tutorial will show you how to accomplish this, step by step. You can modify it to call any function or webservice. This is similar to the WallStreetJournal.com except they show search results in their tooltip window and they leave the functionality of the context menu while I have chosen to supress it.
"
Re:awesome (Score:1)
stop that! (Score:5, Insightful)
Re:stop that! (Score:3, Informative)
So you're still using Internet Explorer, then?
I've just tried it with Firefox, which can optionally prevent JavaScript code from disabling context menus, and the usual right-click menu appeared with the AJAX-generated tooltip beneath it.
Re:stop that! (Score:2)
With the default settings, it does suppress the Firefox context menu, though a second right click does bring it up.
But if you're using Firefox, there are a number of extensions that give you this functionality across all websites without messing with your context menu, so this hack is just annoying.
Re:stop that! (Score:4, Insightful)
Re:stop that! (Score:4, Insightful)
Re:stop that! (Score:2)
Re:stop that! (Score:2)
Re:stop that! (Score:2)
So turn off JavaScript or use a different User Agent.
The web should be what the content producers and designers want you to see. In the coming DRM age, you're not allowed to skip around in your favorite book or read it backwards. You can't repeat parts of songs or movies anymore either.
<!-- TODO: Replace previous drivel with insightful comment later -->
Re:stop that! (Score:2)
Much less intrusive than repurposing the right mouse button.
Re:stop that! (Score:2)
-matthew
Re:stop that! (Score:1)
an ajax article.. (Score:3, Insightful)
2 things (Score:5, Funny)
2. My right-click menu is *sacred*. Really, I kill kittens on its altar every morning. Thou shalt not dare to touch it. For he will not slay thee in thy turn, etc etc. Seriously, don't mess with people's interface. Luckily my fancy browser denies such requests as yours.
Did I mention I use a cool browser?
Re:2 things (Score:2)
Face it, there's no cure for asshole web designers short of the firing squad. Well, that or a greasemonkey script or two
This is great (Score:5, Funny)
Agreed (Score:1)
Re:This is great (Score:3, Funny)
Even a stopped clock gives the right time twice a day.
I'm bored, so I checked.... (Score:1)
Submitter site didn't do "to", "the", or "XSLT".
Am I missing the concept of "any word"?
Re:I'm bored, so I checked.... (Score:3, Informative)
It's kinda like what they do at http://newsinchinese.com/ [newsinchinese.com] And, sorta like the firefox extension from http://www.asdotrans.com/ [asdotrans.com].
I could see myself using a modified version of this.
--
The negative tone of my parent post was unintentional
Re:I'm bored, so I checked.... (Score:1)
browser compatibility (Score:2, Informative)
Re:browser compatibility (Score:3, Informative)
The problem?
var ie = document.all&&document.getElementById
var ff = document.getElementById&&!document.all
Re:browser compatibility (Score:2)
Advanced Tab
Content
JavaScript Options...
"Allow script to receive right clicks" (unchecked by default)
Re:browser compatibility (Score:1)
Just like the website... (Score:4, Funny)
Re:Just like the website... (Score:1)
You should try the Answers.com Firefox extension [answers.com] or Windows plugin [answers.com] (for IE users). They let you alt+click on any word, or right-click to get a definition from the context menu, even without selecting the word.
Disclaimer: I work for Answers.com [answers.com].
Regards,
-- Avi
Great, but Wrong (Score:5, Insightful)
I'm sure a lot of us find this kind of crap annoying. A website developer just not have enough information to determine what my most common tasks are and thus properly define a right-click menu for me. I don't want them to have that information. My right-click menu already has a dictionary in it, as well as a handful of other functions. Now this site pops up a second context menu on the page that takes much, much longer to load and has fewer of the functions I want.
To me this says, "screw you" to users of decent browsers in favor of working around IE + Windows failure to provide a good way to integrate this functionality in the proper location.
Open your mind (Score:2)
If I am using a web-based AJAX email client like OWA or RoundCube mail I not only *expect* the right click menu to behave like a native client ( With options like copy message, move message, flag, delete, etc), I *demand* it. The same is true of other browser-based applications that run on Intranets - these types of rich applications are not "web sites" and should not have to behave as such,they should be as rich as possible.
As
Re:Open your mind (Score:3, Interesting)
Just because you're accessing it in a web browser does not make it a 'web site'.
Umm, yes, it does. It is a page of markup and the very first line they send to my Web browser contains the Web standard they are employing.
If I am using a web-based AJAX email client like OWA or RoundCube mail I not only *expect* the right click menu to behave like a native client ( With options like copy message, move message, flag, delete, etc), I *demand* it.
Not me. If I'm using a Web browser, I demand it treat everyth
Wrong wrong wrong (Score:2)
Not me. If I'm using a Web browser, I demand it treat everything like the content it is. I don't want my controls of my software to be hijacked, or for it attempt to do so. I can already customize my right-click menu, by application and by Web site if I so desire.
You != eveyone. Most people don't "customize their right click menus", and most people expect the context menu in an application to provide contextual information - if you aren't surfing the web the majority of items in a browser's context menu
Re:Wrong wrong wrong (Score:2)
You != eveyone. Most people don't "customize their right click menus", and most people expect the context menu in an application to provide contextual information...
But you're talking about running an application within another application. Since you can't possibly know which application your "Web app" is running in, or what tasks they are trying to accomplish and since a right-click menu should always be a secondary access control, I think it is perfectly reasonable to assume that the intermediary layer
Re:Wrong wrong wrong (Score:2)
Rich applications delivering rich functionality need rich APIs, period. And the contextual menu is one of those rich APIs.
There is absolutely no reason on God's green earth a
Re:Wrong wrong wrong (Score:2)
There is absolutely no reason on God's green earth a web application should be constrained in what it can and can not do with it's GUI simply because it is hosted ina browser.
Allow me to translate: Lalalalalala... I'm not listening. I refuse to hear that applications running in a Web browser are in any way different and I refuse to acknowledge the existence of said browsers when creating software.
Should a Web app then be able to run in fullscreen mode. Should it be able to start fullscreen mode when it
what about word translation ? (Score:4, Interesting)
Re:what about word translation ? (Score:1)
gTranslate (Score:2)
Re:gTranslate (Score:1)
Re:gTranslate (Score:2)
That extension is great, but if you can do it browser independent as with AJAX, it might be better for users I think.
I strongly disagree. This type of functionality is bounded more by the user than the application. As such, the proper place for it is as a plug-in to the OS. For example, a lot of people would never want to translate anything ever. They can just not enable a translation plug-in. Others will want to translate a lot, and if they do so in their browser, they may well need to in their PDF read
Re:gTranslate (Score:2)
AJAX may be good for web site develop
Re:IE not working (Score:1)
Yep... (Score:1)
Dict Greasemonkey script (Score:3, Informative)
It adds a similar, but much less intrusive capability. Simply double-click on any word to highlight it, and the definition is shown in a small window. Once you're done, just click the X (or use my own slgihtly-modified version [legroom.net] and click anywhere on the page) to close it.
Of course, this has both it's pros and cons as compared to the original idea discussed in the story. Since it's a client-side solution, this isn't something that will be available to your visitors. However, the good news is that it doesn't hijack your browser's context menu, which, as mnay other people have commented, is something I personally despise.
Why do that (Score:2)
Oh crap - I swore I'd never become one of those "Look what my OS can do!!11!" Apple fans. Oh well. Take this is as a tip or hint, then, rather than a snark (as it was originally intended).
What's 'right click'?! (Score:2)