A Simple JavaScript To Get English Language Definition From A Dictionary


English is not my first language so I use online dictionaries frequently as a part of my daily routine to clarify and learn unfamiliar words as I read through articles in the Internet.

I have been using http://www.ditionary.com for a long time and I had the plan to make this work easy by creating a small application to retrieve the definition with support of a web service. This morning suddenly a new idea hit me to use JavaScript to get the word in the first place and load the appropriate URL.

How Does This Work?

When a user enters a word in the http://www.dictionary.com interface it redirects the user to the following dynamic URL.


Target-Word is The word we are seeking the definition for

What this JavaScript does is it retrieves the desired word from the user via a prompt, generate the appropriate URL according to the above format and open the new URL in a new window or tab so the time taken (under normal circumstance) to, load the web site, type-in the word, wait till the site redirects you, is saved. Now time is only taken for a single server request/response.

How To Set This Up?

It’s simple, just add a new favorite (for IE) or bookmark (for FireFox) in your browser and paste following code as the URL (for IE) or Location (for FireFox):

javascript:(function(){var%20word=prompt(%22Enter Word:%22);if(word!=null){window.open(%22http://dictionary.reference.com/browse/%22+word);}})();

Add bookmark dialog box in firefox
Add bookmark dialog box in firefox

Now, when you open the favorite/bookmark, it will ask you for the word you want to look for and open the definition in a new window/tab.

Sample use of the script
Sample use of the script

It’s easier to use if you add the bookmark/favorite as a button into your bookmark/links toolbar

Bookmark button
Bookmark button

This small script helps me a lot daily so I hope this would help you too!

Was this post helpful to you? How can I improve? – Your comment is highly appreciated!

Cassian Menol Razeek

11 thoughts on “A Simple JavaScript To Get English Language Definition From A Dictionary

  1. I have been surfing on-line greater than three hours today,
    but I by no means discovered any fascinating article like yours.
    Thank you.


  2. Nice post. I be taught something more challenging on different blogs everyday.
    It is going to all the time be stimulating to learn content from
    different writers and observe a little bit one thing from their store.
    I’d choose to make use of some with the content on
    my weblog whether or not you don’t mind.
    Natually I’ll offer you a link on your internet blog.

    Thanks for sharing.


  3. Extremely happier for your guidance and in addition trust you realize what a powerful job you have been providing training some other people with the aid of your websites. I know that you’ve never got
    to know all of us.


  4. I have recently started a site, the info you provide on this site has
    helped me greatly. Thank you for all of your time
    & work.


  5. This is really interesting, You are a very skilled
    blogger. I have joined your feed and look forward to
    seeking more of your excellent post. Also, I’ve shared your site in my social networks!


  6. Hi Everyone,

    Thanks a lot for your nice comments!

    Unfortunately I have to stop comments on this post to avoid so many spam comments that get through my spam filter everyday.


Comments are closed.

%d bloggers like this: