Help me change Google Custom Search Code

Latest post 08-01-2008 7:05 AM by Nick. 1 replies.
  • 08-01-2008 5:41 AM

    • khoai
    • Top 100 Contributor
    • Joined on 08-01-2008
    • Posts 2
    • Points 0

    Help me change Google Custom Search Code

    Nick,

    I can't follow the topic on CS.org because the Pending Moderation. Please help me to change the following code to JavaScript

    <style type="text/css">
    @import url(http://www.google.com/cse/api/branding.css);
    </style>
    <div class="cse-branding-bottom" style="background-color:#FFFFFF;color:#000000">
      <div class="cse-branding-form">
        <form action="..../search/SearchResults.aspx" id="cse-search-box">
          <div>
            <input type="hidden" name="cx" value="partner-pub-4834229009304130:fszplsaxb10t" />
            <input type="hidden" name="cof" value="FORID:10" />
            <input type="hidden" name="ie" value="UTF-8" />
            <input type="text" name="q" size="25" />
            <input type="submit" name="sa" value="Search" />
          </div>
        </form>
      </div>
      <div class="cse-branding-logo">
        <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
      </div>
      <div class="cse-branding-text">
        Custom Search
      </div>
    </div>

    Thank you very much!

    • Post Points: 0
  • 08-01-2008 7:05 AM In reply to

    • Nick
    • Top 10 Contributor
    • Joined on 10-11-2005
    • Gilwern, S.Wales, Uk
    • Posts 2,786
    • Points 19,725

    Re: Help me change Google Custom Search Code

    <style type="text/css">
    @import url(http://www.google.com/cse/api/branding.css);
    </style>
    <div class="cse-branding-bottom" style="background-color:#FFFFFF;color:#000000">
      <div class="cse-branding-form">
          <div>
            <input type="text" name="q" id="searchquery" size="25" />
            <input type="button" name="sa" onclick="location.href='http://www.google.com/search?q=' + document.getElementById('searchquery').value + '&amp;cx=partner-pub-4834229009304130:fszplsaxb10t&amp;cof=FORID:10&amp;ie=UTF-8';" value="Search" />
          </div>
      </div>
      <div class="cse-branding-logo">
        <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
      </div>
      <div class="cse-branding-text">
        Custom Search
      </div>
    </div>

    try that

     

    • Post Points: 0
Page 1 of 1 (2 items) | RSS