Dynadot Black Friday and Cyber Monday 2026: save more on domains. See our sales.

Dictionary LookUp Script

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch
Double click any words on your site will get its instant definition in the dictionary.

Just add the script below in between <head> and </head>

Code:
<SCRIPT Language="JavaScript">
//don't forget to add <body ondblclick="dictionary()">
function dictionary() {
if (navigator.appName == "Netscape") {
t = document.getSelection();
opennewdictwin(t);
}
else {
t = document.selection.createRange();
if(document.selection.type == 'Text' && t.text != '') {
document.selection.empty();
opennewdictwin(t.text);
}
}
}
function opennewdictwin(text) {
while (text.substr(text.length-1,1)==' ')
text=text.substr(0,text.length-1)
while (text.substr(0,1)==' ')
text=text.substr(1)
if (text > '') {
var newwin = window.open('http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va='+text, 'dictionary', 'width=760,height=500,resizable=yes,menubar=no,scr ollbars=yes,status=no,titlebar=yes,toolbar=no,loca tion=yes,personalbar=yes');

}
}
status='double-click any word - get its instant definition in the dictionary.'
document.ondblclick=dictionary //works for IE only. For NS add <body ondblclick="dictionary()">
</SCRIPT>

After putting this, dont forget to change your <body> to <body ondblclick="dictionary()">

Good Luck!!!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back