Re: "Iconoclastic"? - stupid web tricks...

Date view Thread view Subject view Author view

From: Kragen Sitaker (
Date: Tue Nov 14 2000 - 14:22:45 PST

Willem Broekema writes:
> Erik F. Kastner wrote:
> > heres what I use when I don't know a word (IE 4+ only)
> > make a file in
> [snip]
> > then just highlight, and right click on a word you don't know, go to "Word
> > Lookup" and viola!
> A bookmarklet with url
> javascript:q=document.getSelection();if(!q){void(q=prompt('Word...',''))};if(q)location.href=''+escape(q)
> gives about the same functionality, FWIW.

Here's a version, without the prompt:

<a href="javascript:location='*&Database=*&Form=Dict1&Query='+escape(document.getSelection())">Lookup</a>

Here's a version that pops up windows from,, and

<a href="javascript:q=escape(document.getSelection());void'*&Database=*&Form=Dict1&Query='+q);void''+q);void''+q)/*kjs*/">Lookup</a> another word in a new window

Unfortunately, these are Netscape-only; I should go ahead and figure
out how to document.getSelection() in MSIE.

<>       Kragen Sitaker     <>
Perilous to all of us are the devices of an art deeper than we ourselves
                -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]

Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Nov 17 2000 - 18:22:22 PST