Do you know how in CSE XML you can redirect to another CSE, in order
to increase the number of refinements (visible refinements-at least),
with a xml statement with a redirect lable that would look something
like:

"http://www.google.com/cse?cx=....q=$q&safe=active&sa=Search";

This xml code will put the original search term q into the new search
as $q, and when sa=Search, will execute the search inside of the
second cse. Basically the affect I am going for  with javascript/ajax/
xhtml

I have done something similar just with a small box on a sharepoint
site (don't get mad at me because its ms:)) with the code that looks
like:

var q = document.getElementById("q");
  if(q && q.value.length > 0)
  {
    var newPage = document.getElementById("newPage");
    if(newPage)
    {
      var url = "http://www.google.com/cse?cref=.....
(urlhere)....xml&safe=active&q=" + q.value;
      if(newPage.checked)
        window.open(url);
      else
        document.location.href(url);
    }
  }
  else
  {
    alert("Please enter one or more search words.");
  }
}

how can I the q involved so that it seems to work, but don't know how
to go from sFormDiv to the q version and still make it work. I am
wondering if there is away to right the url statement so that my
search term could entered into the searchform just like with the XML
redirect statement. I have read the RESTful interface documents and
looked at the DOCs, which seam to suggest there is a way to create a
redirect like this and to give the query term a name like q=, so that
a search could be executed by means other than putting text into the
gsc-input.



Also, I have a second (actually its my third) question---http://
groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/
1b29efbea57c57fa#

On Feb 26, 11:21 am, Jeremy Geerdes <[email protected]> wrote:
> So, in short, you're wanting to execute the search control on a second  
> page?
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project 
> quote:http://jgeerdes.home.mchsi.comhttp://jgeerdes.blogspot.comhttp://jgeerdes.wordpress.com
> [email protected]
>
> Unless otherwise noted, any price quotes contained within this  
> communication are given in US dollars.
>
> If you're in the Des Moines, IA, area, check out Debra Heights  
> Wesleyan Church!
>
> And check out my blog, Adventures in Web Development, 
> athttp://jgeerdes.blogspot.com
>   !
>
> On Feb 25, 2009, at 12:02 PM, Scotty A wrote:
>
>
>
>
>
> > I  have created an AJAX API based search using the "searchForm" and
> > placed this into a DOM object in my CSS based HTML. The search works
> > fine, but I wanted to create additional search pages, because the
> > number of CREF AJAX Searchers has grown pretty large, and I wanted to
> > customize each searcher for an even more specific group of
> > information. What I am trying to do is edit the code, so I can utilize
> > an HTML or AJAX statement that will allow me to pass a $q or query
> > term into the searchForm on another page. I have done something
> > similar in the past with XML for CSE redirects, but I don't know how
> > to do this with AJAX.
>
> > var options = new google.search.DrawOptions();
> >        options.setSearchFormRoot(document.getElementById
> > ("searchForm"));
> >            var sFormDiv = document.getElementById("searchForm");
>
> > <--! in between these statements are the searchers--!>
>
> > this.control.draw(sFormDiv);
> >      }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to