Google apps
Main menu

Post a Comment On: On the Blog

"Window.google.ac has no properties : The low-down"

5 Comments -

1 – 5 of 5
Anonymous Anonymous said...

Google has changed the function name this time from "sendRPCDone" to "Suggest_apply". This can easily be fixed by the following code in ac.js.

window.google = new Object();
window.google.ac = new Object();
window.google.ac.Suggest_apply = sendRPCDone;

However, they've also changed the array structure so that keywords and number of results now comes in the same array in consequent elements. So changed will have to be made to the iterations in sendRCPDone.

window.google.ac.Suggest_apply(frameElement, "k;", new Array(2, "kmart", "4,280,000 results", "k n", "3,850,000 results", "k swiss", "17,400,000 results", "k n filters", "1,860,000 results", "k lite", "10,900,000 results", "k lite codec", "3,690,000 results", "k n air filters", "1,580,000 results", "k g", "310,000 results", "k lite codec pack", "3,090,000 results", "klove", "4,060,000 results"), new Array(""));

11 Oct 2007, 12:43:00

Blogger Si said...

Many thanks Fred. I noticed the different function name earlier today. Thanks for the heads-up about the keyword array. I'll make the changes this evening latest.

11 Oct 2007, 13:44:00

Blogger Si said...

Done.

I copied their new ac.js and added the new Object hooks again. That way the array handling is updated too.

Thanks again for your help Fred.

11 Oct 2007, 14:19:00

Anonymous Anonymous said...

Great quick response.

I've been trying to run more than one suggest dropdowns on the same page. One feeds of Google, the other one feeds of my own Suggest_apply request. The problem is that I'm struggling to encapsulate the whole script without the two scripts running in to each other.
Has anyone done this?

My thinking is that you put the whole script in a construct Suggest() {ac.js}.

var first = new Suggest();
Where Suggest is the whole ac.js script encapsulated.

11 Oct 2007, 14:54:00

Blogger Si said...

Hi Fred,

You would either have to ensure that all function and global variable names are unique or, as you say, wrap them in objects.

var googleSuggest.sendRPCDone = function(...) { ... }

var fredsSuggest.sendRPCDone = function(...) { ... }

Note that...
function sendRPCDone() { };
var myObject.sendRPCDone = sendRPCDone;
...might not be enough, as it is simply referencing a single instance of the function. I'm not sure about this, though.

11 Oct 2007, 15:22:00

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot