Skip to main content
Inspiring
September 17, 2010
Question

Google search redirect

  • September 17, 2010
  • 1 reply
  • 551 views

Hi Folks,

I'm trying to submit my form to google so I can use their websearch.

Depending on what radio button is selected, if the google button is selected I'd like to redirect the search cireteria to the google search.

Am I right in thinking you can't pass parameters using cflocation?

Is there another way I can do this?

My form is below:

   <form action="index.cfm" method="post" name="staffsearch" s>
 
        <input type="text" name="searchname"  id="searchname"  onclick="this.value='';"  value="Enter search criteria" />
        <input name="submit" type="submit" id="searchbutton" value="Search" />

Staff
        <input name="area" type="radio" value="staffdirectory/results" checked>
        Intranet
        <input name="area" type="radio" value="mainresults" >
     Web
         <input name="area" type="radio" value="google" >
      </div>
    </form>

The stand alone google form is:

<form  name="search" method="get" action="http://www.google.co.uk/search">
      <input type="hidden" name="websearch" class="" value="" />
   Search
   
        <input name="q" type="text"  value=""  />
        <input name="submit" type="submit" value="Search"  />

    </form>

Many thanks

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 10, 2010

    Am I right in thinking you can't pass parameters using cflocation?

    One cannot pass form parameters with a <cflocation>, no.  <cflocation> tells the browser to do a 30x redirect (302 by default), and does a GET of the specified URL.

    However as far as I can see, Google works with GETs anyhow, so you should be OK just passing the params on the URL.

    --

    Adam