View Single Post
Old 09-05-2010, 01:39 PM   PM User | #3
aravitejareddy
New to the CF scene

 
Join Date: Sep 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
aravitejareddy is an unknown quantity at this point
Thanks for your reply for my question

I want the script to be used as a bookmarklet or an extension .,. since an extension is lil hard a bookmarklet with the javascript is fine .,.

My Javascript bookmarklet already does this thing

When text is selected and clicked on the bookmarklet it opens a new tab and does an exact search with the snippet of the text selected using google.com/search?q="(myselected text)"

Now i want it to do automatically on a key press

When certain text is selected and selected key is pressed it should do the work as when i clicked on the bookmarklet.

Note: I'm using this bookmarklet in CHROME

my javascript is
javascript:a = "" + (window.getSelection() ? document.getSelection() : document.selection.createRange().text); if (a!=null)window.open("http://www.google.com/search?q=\"" + escape(a)+ "\"");
aravitejareddy is offline   Reply With Quote