Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Makosuke

macrumors 604
Original poster
Aug 15, 2001
6,801
1,523
The Cool Part of CA, USA
I'm wondering if anybody familiar with Google Coop knows if there are any issues connected with removing that chunk of Javascript that Google gives you with the default Coop search box code. I don't really want the grey "Google Custom Search" text to show up in the box by default and as far as I can tell that's all the included Javascript does, but I'm cautious about messing around with code that Google gives you.

I'm under the impression that the hidden "cx" form element that links the box to your customized Coop search and the "cof" one that tells it what kind of advertising you want are all that's required, but anybody have experience with deleting the Javascript chunk?
 
Yes! Just don't include the javascript (illustrated below). The search will still work without it!

Code:
<script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_013834750016609345743%3Ag3xdtmbbzsk"></script>
 
Thanks. I figured as much, but when it comes to goofing with Google-suppled code, it's always nice to hear a second opinion.

Admittedly, Coop seems to be pretty darned flexible about how you feed searches to the engine--as far as I can tell, as long as you send them a properly formatted search, they could care less how you generated it. A big step up from the "Don't so much as breathe on the code!" AdSense for search, in all it's crusty, form-based, Transitional glory.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.