View Full Version : search form of google in a div it's possible ?

04-14-2011, 10:04 AM
i want load search result of google search form into a DIV without having to reload the browser or use IFRAMES

i have found this script:

but i have difficult to implement it in a form search of google
the search form of google is this:

<form action="http://site.com/search.php" id="cse-search-box">
<input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxxx" />
<input type="hidden" name="cof" value="FORID:9" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="25" />
<input type="submit" name="sa" value="Cerca" />

<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=it"></script>

and code for page(search.php) where i see results:

<div id="cse-search-results"></div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 800;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

It's possible load results with this javascript or similar code in a div of a page?