Missing method in Google Suggest Clone

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Missing method in Google Suggest Clone

Post by impulse() »

I've been trying to implement the Google Suggest Clone from http://www.phpriot.com/d/articles/php/a ... st-ajaxac/. But I'm getting the error
PHP Fatal error: Call to undefined method GoogleSuggestCloneJax::addJsLib() in /var/www/html/test/GoogleSuggestCloneJax.class.php on line 41
The method isn't in the code, nor does it seem to be mentioned in any of the hosted code.

Has anybody here come across this before? I have e-mailed the author but I'm awaiting a reply.


Regards,
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Missing method in Google Suggest Clone

Post by superdezign »

impulse() wrote:The method isn't in the code, nor does it seem to be mentioned in any of the hosted code.
Did you read the article or just copy and paste? Usually, developers that write long articles for code want you to actually read it, so they break it up or omit some things for you to do on your own.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

The latters.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

The latter... as in you just copied and pasted? Shame. You'll never learn that way.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Thanks for the help.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

After reading through the whole document I find this is more a jigsaw than documentation. I'm not sure if the author has tried to make it as confusing as possible but from what I can see functions are scattered throughout the chapters without any explanation of where they should go, only what they should do.

I will keep trying as I can't quit now I've started.

Example:
// ... other code ... //
Thanks author, that's sure hit the nail on the head.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

impulse() wrote:Example:
// ... other code ... //
Thanks author, that's sure hit the nail on the head.
Hehe. Maybe you should find a better document to read. I'm sure he's not the only one that's tried it.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Wow, I've just really intense dejavu. The whole speaking to you about a problem and then counting how many cigarettes are in my pack shortly afterwards. :)
Schmutzka
Forum Newbie
Posts: 1
Joined: Wed Aug 29, 2007 5:06 am

Post by Schmutzka »

I have the very same problem, unfortunately.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

I used a different script in the end. Can't remember where I got it from, sorry.
Post Reply