Closed Thread Icon

Topic awaiting preservation: Google Suggest (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24441" title="Pages that link to Topic awaiting preservation: Google Suggest (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Google Suggest <span class="small">(Page 1 of 1)</span>\

 
wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 12-18-2004 13:23

Thought you guys might wana see this:

http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

mas
Maniac (V) Mad Librarian

From: the space between us
Insane since: Sep 2002

posted posted 12-18-2004 13:28

yep. just saw it on slashdot. nice stuff.

B | T | E | P | L

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 12-18-2004 15:16

neat... but it's still a long way till javascript will do all those things I want it to do.
Nevertheless, rather cool. Now, if I could really access the text and current positon in a textarea without IE,
we could have an automatic linkword suggostor for the grail. Just start a word with -> and you'd get a suggestion of linkwords...

hm... any news on the 'get current Pos' front in textareas?

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 12-18-2004 18:03

Nice stuff, btw I've seen an extension for FireFox to display the suggestions and results below the Search Bar.

Tyberius Prime: I'm pretty sure we could code a little script to log the keys typed in the textarea and do the automatic linkword suggestor rather easily. I could code it if you want. However I'll need a hand to test it on Safari.

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 12-18-2004 18:14

well, poi,
if your 'little script' also handles people moving back and forth in the text area, and actually inserting at cursor (not at the end of the text),
I'm all for it. Getting the backend ready would not be a problem.

The workarounds we'd have to do for opera (which is not supporting that XMLHTTP object) also means to me: If we can get the suggest&insert script working in IE and Firefox (and possibly some of the Mac & Linux browsers), it's good enough for me.

So long,

->Tyberius Prime

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 12-18-2004 18:24

Actually I spoke a little fast here. If the users move the cursor with left/right or paste something is not really a problem, but if they move the cursor with up/down the changement of position depend of the width of the textarea and therefore of the size of the window as its a liquid design. Anyway many cases can covered. I'll try to code tonight ( I'm still with my brother his wife and their few days old son ).

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 12-18-2004 23:05

I've found the URL of the Proof of Concept New Google Suggest Extension

SmashHallon
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Mar 2003

posted posted 01-05-2005 11:13

Hi,

This script was reeaaally cool

If I would like to make a script like this but far much easier, does anyone have any suggestions on how to start?

I see that this is very advanced but if I know 20 car-brands and have an array with all, can I then somehow easily show all that starts with the chars I type in a textfield in a SPAN or DIV?

And another question. How many items can u have in an array in javascript?

And yes, I have googled for a while before asking for suggestions, and I am not asking anyone to do the script just some quick tips for getting me started. I know I should use keyDown.

One question:

What is it that makes the google-script so much cooler than for example:

http://www.unitedscripters.com/index.html?file=/scripts/dhtml15.html&ref=http://www.google.se/search?q=auto%20complete%20suggest%20script%20input&hl=sv&lr=&sa=N&tab=gw

Please don´t laugh at me, just asking a newbie-question


Kind Regards and a Happy new Year
/Smash

(Edited by SmashHallon on 01-05-2005 11:20)

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 01-05-2005 11:45

I guess this particular instance would be quite easy, albeit my solution is quite inelegant, like a lot of my code

Basically, stick all the names of the cars into an array. Now, every "onKeyDown" event, check if the focus is on the text box people are typing in. If so, it's tiem for a check. So, you check the length of the text in the box, cut off that many characters from the start of the name of each car, and check for equivalency. For each one that fits, add that to an array, then do a similar thing to what google have done with the display.

Actually, while suggest is very cool, there are still some problems with it. For example, if i get a suggestion and press down to select one but don't press enter, then use the scroll down function on my trackpad, the suggestions box follows down the page with me.....

Anyway, not sure if my suggestion is of any help :/

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 01-05-2005 21:56

Actually they implemented this on php.net's search too start a function name and you'll get the related functions.



.:[ Never resist a perfect moment ]:.

« BackwardsOnwards »

Show Forum Drop Down Menu