Got Ads?
2/18/2005
  Help with Google Results in an IFRAME

I spent an hour hacking the Y!Q javascript to see if I could get it to call Google. Of course in the end I really only changed about 10 lines. The idea was to see if I could get better "contextual" results.

However, I couldn't get the Google results into an IFRAME cleanly. On Firefox, I kept getting a syntax error.

The yahoo javascript grabs the search results from the page with the following line: document.getElementsByTagName("head").item(0).appendChild(oJSResults);

But when you try it against google, it fails with:

Error: syntax error Source File: http://www.google.com/search?q=click%20fraud%2C %20click%20spam%2C%20google%20click%20fraud%2C %20Overture%20click%20fraud&=Search%20Related %20Info&hl=en&num=5 Line: 1 Source Code: <html><head><meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"><title>Google Search: click fraud, click spam, google click fraud, Overture click fraud </title><style><!--

I think the problem may be that <!-- at the end. Google must put that in there for some reason - and it may be somehow messing up the Javascript/DOM ability to grab the right element. So if you know how to fix that, I'd love it if you'd put a note in the comments. Thanks

 




<< Home

Subscribe to GotAds?



Links



Recent Posts

Help with Google Results in an IFRAME


Archives

February 2005 /  March 2005 /  April 2005 /  May 2005 /  June 2005 /  July 2005 /  August 2005 /  September 2005 /  October 2005 /  November 2005 /  December 2005 /  January 2006 /  February 2006 /  March 2006 /  April 2006 /  May 2006 /  June 2006 /  July 2006 /  August 2006 /  September 2006 /  October 2006 /  November 2006 /  December 2006 /  January 2007 /  February 2007 /  March 2007 /  April 2007 /  May 2007 /  June 2007 /  July 2007 /  August 2007 /  September 2007 /  October 2007 /  November 2007 /  December 2007 /  January 2008 /  February 2008 /  March 2008 /  April 2008 /  May 2008 /  June 2008 /  July 2008 /  August 2008 /  September 2008 /  November 2008 /  December 2008 /  January 2009 /  March 2009 /