Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Google Search Box

    Hi all,

    Wondering if someone could help me with this, I have an "off the shelf" website and there are a few bits that have me puzzled.

    There is a 'built in' search box and i want to activate it with a google search, showing the results from my site.

    Any clues what else the following code needs please?

    #:O)

    Code:
        <form action="http://www.google.com/search" id="search-form">
          <div class="wrapper">
            <input type="text"  value="Searching ..." onBlur="if(this.value=='') this.value='Searching ...'" onFocus="if(this.value =='Searching ...' ) this.value=''" />
            <input type="submit" value="" id="search-submit">
          </div>
        </form>

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Apostropartheid thanks for your reply, I understand that there are a number of "generic" search type tools, however the layout of what I already have is particually nice which is why I would prefer to use the code I have as opposed to inserting a Google Box in place of it.

    As it stands when I type anything into the seach box, it ignores what I have typed and returns the page http://www.google.com/webhp in all cases.

    Whats already there is close, but needless to say theres something important missing.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •